Merge branch 'master' into for-next
authorJiri Kosina <jkosina@suse.cz>
Wed, 11 Aug 2010 07:36:51 +0000 (09:36 +0200)
committerJiri Kosina <jkosina@suse.cz>
Wed, 11 Aug 2010 07:36:51 +0000 (09:36 +0200)
Conflicts:
fs/exofs/inode.c

13 files changed:
1  2 
block/blk-core.c
drivers/usb/gadget/f_hid.c
drivers/usb/gadget/langwell_udc.c
drivers/usb/host/ehci-hcd.c
drivers/usb/host/imx21-hcd.c
drivers/usb/host/ohci-hcd.c
drivers/usb/host/oxu210hp-hcd.c
drivers/usb/misc/ftdi-elan.c
drivers/usb/serial/ftdi_sio.c
drivers/usb/serial/io_ti.c
drivers/usb/serial/iuu_phoenix.c
fs/exofs/inode.c
fs/exofs/ios.c

diff --combined block/blk-core.c
index 7ac24fa71f7a1f18b58e4efbf3695cbc14d75b86,7da630e25ae7a4d7b82623a10d2c99233bb28f5a..77411486b11195cc79b0e3ab5433fc28e8a94805
@@@ -184,7 -184,7 +184,7 @@@ void blk_dump_rq_flags(struct request *
        printk(KERN_INFO "  bio %p, biotail %p, buffer %p, len %u\n",
               rq->bio, rq->biotail, rq->buffer, blk_rq_bytes(rq));
  
-       if (blk_pc_request(rq)) {
+       if (rq->cmd_type == REQ_TYPE_BLOCK_PC) {
                printk(KERN_INFO "  cdb: ");
                for (bit = 0; bit < BLK_MAX_CDB; bit++)
                        printk("%02x ", rq->cmd[bit]);
@@@ -608,6 -608,7 +608,7 @@@ blk_init_allocated_queue_node(struct re
  
        q->request_fn           = rfn;
        q->prep_rq_fn           = NULL;
+       q->unprep_rq_fn         = NULL;
        q->unplug_fn            = generic_unplug_device;
        q->queue_flags          = QUEUE_FLAG_DEFAULT;
        q->queue_lock           = lock;
@@@ -1135,30 -1136,46 +1136,46 @@@ void blk_put_request(struct request *re
  }
  EXPORT_SYMBOL(blk_put_request);
  
+ /**
+  * blk_add_request_payload - add a payload to a request
+  * @rq: request to update
+  * @page: page backing the payload
+  * @len: length of the payload.
+  *
+  * This allows to later add a payload to an already submitted request by
+  * a block driver.  The driver needs to take care of freeing the payload
+  * itself.
+  *
+  * Note that this is a quite horrible hack and nothing but handling of
+  * discard requests should ever use it.
+  */
+ void blk_add_request_payload(struct request *rq, struct page *page,
+               unsigned int len)
+ {
+       struct bio *bio = rq->bio;
+       bio->bi_io_vec->bv_page = page;
+       bio->bi_io_vec->bv_offset = 0;
+       bio->bi_io_vec->bv_len = len;
+       bio->bi_size = len;
+       bio->bi_vcnt = 1;
+       bio->bi_phys_segments = 1;
+       rq->__data_len = rq->resid_len = len;
+       rq->nr_phys_segments = 1;
+       rq->buffer = bio_data(bio);
+ }
+ EXPORT_SYMBOL_GPL(blk_add_request_payload);
  void init_request_from_bio(struct request *req, struct bio *bio)
  {
        req->cpu = bio->bi_comp_cpu;
        req->cmd_type = REQ_TYPE_FS;
  
-       /*
-        * Inherit FAILFAST from bio (for read-ahead, and explicit
-        * FAILFAST).  FAILFAST flags are identical for req and bio.
-        */
-       if (bio_rw_flagged(bio, BIO_RW_AHEAD))
+       req->cmd_flags |= bio->bi_rw & REQ_COMMON_MASK;
+       if (bio->bi_rw & REQ_RAHEAD)
                req->cmd_flags |= REQ_FAILFAST_MASK;
-       else
-               req->cmd_flags |= bio->bi_rw & REQ_FAILFAST_MASK;
-       if (bio_rw_flagged(bio, BIO_RW_DISCARD))
-               req->cmd_flags |= REQ_DISCARD;
-       if (bio_rw_flagged(bio, BIO_RW_BARRIER))
-               req->cmd_flags |= REQ_HARDBARRIER;
-       if (bio_rw_flagged(bio, BIO_RW_SYNCIO))
-               req->cmd_flags |= REQ_RW_SYNC;
-       if (bio_rw_flagged(bio, BIO_RW_META))
-               req->cmd_flags |= REQ_RW_META;
-       if (bio_rw_flagged(bio, BIO_RW_NOIDLE))
-               req->cmd_flags |= REQ_NOIDLE;
  
        req->errors = 0;
        req->__sector = bio->bi_sector;
@@@ -1181,12 -1198,12 +1198,12 @@@ static int __make_request(struct reques
        int el_ret;
        unsigned int bytes = bio->bi_size;
        const unsigned short prio = bio_prio(bio);
-       const bool sync = bio_rw_flagged(bio, BIO_RW_SYNCIO);
-       const bool unplug = bio_rw_flagged(bio, BIO_RW_UNPLUG);
+       const bool sync = (bio->bi_rw & REQ_SYNC);
+       const bool unplug = (bio->bi_rw & REQ_UNPLUG);
        const unsigned int ff = bio->bi_rw & REQ_FAILFAST_MASK;
        int rw_flags;
  
-       if (bio_rw_flagged(bio, BIO_RW_BARRIER) &&
+       if ((bio->bi_rw & REQ_HARDBARRIER) &&
            (q->next_ordered == QUEUE_ORDERED_NONE)) {
                bio_endio(bio, -EOPNOTSUPP);
                return 0;
  
        spin_lock_irq(q->queue_lock);
  
-       if (unlikely(bio_rw_flagged(bio, BIO_RW_BARRIER)) || elv_queue_empty(q))
+       if (unlikely((bio->bi_rw & REQ_HARDBARRIER)) || elv_queue_empty(q))
                goto get_rq;
  
        el_ret = elv_merge(q, &req, bio);
@@@ -1275,7 -1292,7 +1292,7 @@@ get_rq
         */
        rw_flags = bio_data_dir(bio);
        if (sync)
-               rw_flags |= REQ_RW_SYNC;
+               rw_flags |= REQ_SYNC;
  
        /*
         * Grab a free request. This is might sleep but can not fail.
@@@ -1464,7 -1481,7 +1481,7 @@@ static inline void __generic_make_reque
                        goto end_io;
                }
  
-               if (unlikely(!bio_rw_flagged(bio, BIO_RW_DISCARD) &&
+               if (unlikely(!(bio->bi_rw & REQ_DISCARD) &&
                             nr_sectors > queue_max_hw_sectors(q))) {
                        printk(KERN_ERR "bio too big device %s (%u > %u)\n",
                               bdevname(bio->bi_bdev, b),
                if (bio_check_eod(bio, nr_sectors))
                        goto end_io;
  
-               if (bio_rw_flagged(bio, BIO_RW_DISCARD) &&
-                   !blk_queue_discard(q)) {
+               if ((bio->bi_rw & REQ_DISCARD) && !blk_queue_discard(q)) {
                        err = -EOPNOTSUPP;
                        goto end_io;
                }
@@@ -1583,7 -1599,7 +1599,7 @@@ void submit_bio(int rw, struct bio *bio
         * If it's a regular read/write or a barrier with data attached,
         * go through the normal accounting stuff before submission.
         */
-       if (bio_has_data(bio) && !(rw & (1 << BIO_RW_DISCARD))) {
+       if (bio_has_data(bio) && !(rw & REQ_DISCARD)) {
                if (rw & WRITE) {
                        count_vm_events(PGPGOUT, count);
                } else {
@@@ -1618,7 -1634,7 +1634,7 @@@ EXPORT_SYMBOL(submit_bio)
   *    the insertion using this generic function.
   *
   *    This function should also be useful for request stacking drivers
 - *    in some cases below, so export this fuction.
 + *    in some cases below, so export this function.
   *    Request stacking drivers like request-based dm may change the queue
   *    limits while requests are in the queue (e.g. dm's table swapping).
   *    Such request stacking drivers should check those requests agaist
   */
  int blk_rq_check_limits(struct request_queue *q, struct request *rq)
  {
+       if (rq->cmd_flags & REQ_DISCARD)
+               return 0;
        if (blk_rq_sectors(rq) > queue_max_sectors(q) ||
            blk_rq_bytes(rq) > queue_max_hw_sectors(q) << 9) {
                printk(KERN_ERR "%s: over max size limit.\n", __func__);
@@@ -1796,7 -1815,7 +1815,7 @@@ struct request *blk_peek_request(struc
                         * sees this request (possibly after
                         * requeueing).  Notify IO scheduler.
                         */
-                       if (blk_sorted_rq(rq))
+                       if (rq->cmd_flags & REQ_SORTED)
                                elv_activate_rq(q, rq);
  
                        /*
@@@ -1984,10 -2003,11 +2003,11 @@@ bool blk_update_request(struct request 
         * TODO: tj: This is too subtle.  It would be better to let
         * low level drivers do what they see fit.
         */
-       if (blk_fs_request(req))
+       if (req->cmd_type == REQ_TYPE_FS)
                req->errors = 0;
  
-       if (error && (blk_fs_request(req) && !(req->cmd_flags & REQ_QUIET))) {
+       if (error && req->cmd_type == REQ_TYPE_FS &&
+           !(req->cmd_flags & REQ_QUIET)) {
                printk(KERN_ERR "end_request: I/O error, dev %s, sector %llu\n",
                                req->rq_disk ? req->rq_disk->disk_name : "?",
                                (unsigned long long)blk_rq_pos(req));
        req->buffer = bio_data(req->bio);
  
        /* update sector only for requests with clear definition of sector */
-       if (blk_fs_request(req) || blk_discard_rq(req))
+       if (req->cmd_type == REQ_TYPE_FS || (req->cmd_flags & REQ_DISCARD))
                req->__sector += total_bytes >> 9;
  
        /* mixed attributes always follow the first bio */
@@@ -2111,11 -2131,32 +2131,32 @@@ static bool blk_update_bidi_request(str
            blk_update_request(rq->next_rq, error, bidi_bytes))
                return true;
  
-       add_disk_randomness(rq->rq_disk);
+       if (blk_queue_add_random(rq->q))
+               add_disk_randomness(rq->rq_disk);
  
        return false;
  }
  
+ /**
+  * blk_unprep_request - unprepare a request
+  * @req:      the request
+  *
+  * This function makes a request ready for complete resubmission (or
+  * completion).  It happens only after all error handling is complete,
+  * so represents the appropriate moment to deallocate any resources
+  * that were allocated to the request in the prep_rq_fn.  The queue
+  * lock is held when calling this.
+  */
+ void blk_unprep_request(struct request *req)
+ {
+       struct request_queue *q = req->q;
+       req->cmd_flags &= ~REQ_DONTPREP;
+       if (q->unprep_rq_fn)
+               q->unprep_rq_fn(q, req);
+ }
+ EXPORT_SYMBOL_GPL(blk_unprep_request);
  /*
   * queue lock must be held
   */
@@@ -2126,11 -2167,15 +2167,15 @@@ static void blk_finish_request(struct r
  
        BUG_ON(blk_queued_rq(req));
  
-       if (unlikely(laptop_mode) && blk_fs_request(req))
+       if (unlikely(laptop_mode) && req->cmd_type == REQ_TYPE_FS)
                laptop_io_completion(&req->q->backing_dev_info);
  
        blk_delete_timer(req);
  
+       if (req->cmd_flags & REQ_DONTPREP)
+               blk_unprep_request(req);
        blk_account_io_done(req);
  
        if (req->end_io)
@@@ -2363,7 -2408,7 +2408,7 @@@ void blk_rq_bio_prep(struct request_que
                     struct bio *bio)
  {
        /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw */
-       rq->cmd_flags |= bio->bi_rw & REQ_RW;
+       rq->cmd_flags |= bio->bi_rw & REQ_WRITE;
  
        if (bio_has_data(bio)) {
                rq->nr_phys_segments = bio_phys_segments(q, bio);
@@@ -2450,6 -2495,8 +2495,8 @@@ static void __blk_rq_prep_clone(struct 
  {
        dst->cpu = src->cpu;
        dst->cmd_flags = (rq_data_dir(src) | REQ_NOMERGE);
+       if (src->cmd_flags & REQ_DISCARD)
+               dst->cmd_flags |= REQ_DISCARD;
        dst->cmd_type = src->cmd_type;
        dst->__sector = blk_rq_pos(src);
        dst->__data_len = blk_rq_bytes(src);
index 9447427fcbffe6c1b0e75d9fd9de85f15d517ca5,53e120208e990c5a423b76dfa5578b5991aabf17..111b85ca7ac0971d8edc029aa8e5e5d53cac1656
@@@ -142,7 -142,7 +142,7 @@@ static struct usb_descriptor_header *hi
  static ssize_t f_hidg_read(struct file *file, char __user *buffer,
                        size_t count, loff_t *ptr)
  {
-       struct f_hidg   *hidg     = (struct f_hidg *)file->private_data;
+       struct f_hidg   *hidg     = file->private_data;
        char            *tmp_buff = NULL;
        unsigned long   flags;
  
@@@ -200,7 -200,7 +200,7 @@@ static void f_hidg_req_complete(struct 
  static ssize_t f_hidg_write(struct file *file, const char __user *buffer,
                            size_t count, loff_t *offp)
  {
-       struct f_hidg *hidg  = (struct f_hidg *)file->private_data;
+       struct f_hidg *hidg  = file->private_data;
        ssize_t status = -ENOMEM;
  
        if (!access_ok(VERIFY_READ, buffer, count))
  
  static unsigned int f_hidg_poll(struct file *file, poll_table *wait)
  {
-       struct f_hidg   *hidg  = (struct f_hidg *)file->private_data;
+       struct f_hidg   *hidg  = file->private_data;
        unsigned int    ret = 0;
  
        poll_wait(file, &hidg->read_queue, wait);
@@@ -318,6 -318,8 +318,6 @@@ static void hidg_set_report_complete(st
        spin_unlock(&hidg->spinlock);
  
        wake_up(&hidg->read_queue);
 -
 -      return;
  }
  
  static int hidg_setup(struct usb_function *f,
@@@ -411,6 -413,8 +411,6 @@@ static void hidg_disable(struct usb_fun
  
        usb_ep_disable(hidg->in_ep);
        hidg->in_ep->driver_data = NULL;
 -
 -      return;
  }
  
  static int hidg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
index f1a070280c9c0f9fa756f3dd307d194a361fd1a9,c2d2a201f84bc65759cbec099b7daf63a8b925bc..d41b69cf508b6c3216ba62cf4717723877638959
@@@ -284,6 -284,7 +284,6 @@@ static void ep0_reset(struct langwell_u
        }
  
        VDBG(dev, "<--- %s()\n", __func__);
 -      return;
  }
  
  
@@@ -841,9 -842,9 +841,9 @@@ static int langwell_ep_queue(struct usb
                VDBG(dev, "req->mapped = 0\n");
        }
  
-       DBG(dev, "%s queue req %p, len %u, buf %p, dma 0x%08x\n",
-                       _ep->name,
-                       _req, _req->length, _req->buf, _req->dma);
+       DBG(dev, "%s queue req %p, len %u, buf %p, dma 0x%08llx\n",
+           _ep->name,
+           _req, _req->length, _req->buf, (unsigned long long)_req->dma);
  
        _req->status = -EINPROGRESS;
        _req->actual = 0;
@@@ -1485,6 -1486,7 +1485,6 @@@ static void langwell_udc_start(struct l
        writel(usbcmd, &dev->op_regs->usbcmd);
  
        DBG(dev, "<--- %s()\n", __func__);
 -      return;
  }
  
  
@@@ -1507,6 -1509,7 +1507,6 @@@ static void langwell_udc_stop(struct la
        writel(usbcmd, &dev->op_regs->usbcmd);
  
        DBG(dev, "<--- %s()\n", __func__);
 -      return;
  }
  
  
index 6fcffe15a005b470f284cc769d28244925cee32c,34a928d3b7d2f69ddf671330cc9bbb60dbf5405c..ac0f7a4b03410f51dd8b637717207222cea4f259
@@@ -36,6 -36,7 +36,7 @@@
  #include <linux/dma-mapping.h>
  #include <linux/debugfs.h>
  #include <linux/slab.h>
+ #include <linux/uaccess.h>
  
  #include <asm/byteorder.h>
  #include <asm/io.h>
@@@ -78,7 -79,13 +79,13 @@@ static const char   hcd_name [] = "ehci_h
  #define       EHCI_TUNE_RL_TT         0
  #define       EHCI_TUNE_MULT_HS       1       /* 1-3 transactions/uframe; 4.10.3 */
  #define       EHCI_TUNE_MULT_TT       1
- #define       EHCI_TUNE_FLS           2       /* (small) 256 frame schedule */
+ /*
+  * Some drivers think it's safe to schedule isochronous transfers more than
+  * 256 ms into the future (partly as a result of an old bug in the scheduling
+  * code).  In an attempt to avoid trouble, we will use a minimum scheduling
+  * length of 512 frames instead of 256.
+  */
+ #define       EHCI_TUNE_FLS           1       /* (medium) 512-frame schedule */
  
  #define EHCI_IAA_MSECS                10              /* arbitrary */
  #define EHCI_IO_JIFFIES               (HZ/10)         /* io watchdog > irq_thresh */
@@@ -100,6 -107,11 +107,11 @@@ static int ignore_oc = 0
  module_param (ignore_oc, bool, S_IRUGO);
  MODULE_PARM_DESC (ignore_oc, "ignore bogus hardware overcurrent indications");
  
+ /* for link power management(LPM) feature */
+ static unsigned int hird;
+ module_param(hird, int, S_IRUGO);
+ MODULE_PARM_DESC(hird, "host initiated resume duration, +1 for each 75us\n");
  #define       INTR_MASK (STS_IAA | STS_FATAL | STS_PCD | STS_ERR | STS_INT)
  
  /*-------------------------------------------------------------------------*/
@@@ -304,6 -316,7 +316,7 @@@ static void end_unlink_async(struct ehc
  static void ehci_work(struct ehci_hcd *ehci);
  
  #include "ehci-hub.c"
+ #include "ehci-lpm.c"
  #include "ehci-mem.c"
  #include "ehci-q.c"
  #include "ehci-sched.c"
@@@ -577,6 -590,11 +590,11 @@@ static int ehci_init(struct usb_hcd *hc
        if (log2_irq_thresh < 0 || log2_irq_thresh > 6)
                log2_irq_thresh = 0;
        temp = 1 << (16 + log2_irq_thresh);
+       if (HCC_PER_PORT_CHANGE_EVENT(hcc_params)) {
+               ehci->has_ppcd = 1;
+               ehci_dbg(ehci, "enable per-port change event\n");
+               temp |= CMD_PPCEE;
+       }
        if (HCC_CANPARK(hcc_params)) {
                /* HW default park == 3, on hardware that supports it (like
                 * NVidia and ALI silicon), maximizes throughput on the async
                default:        BUG();
                }
        }
+       if (HCC_LPM(hcc_params)) {
+               /* support link power management EHCI 1.1 addendum */
+               ehci_dbg(ehci, "support lpm\n");
+               ehci->has_lpm = 1;
+               if (hird > 0xf) {
+                       ehci_dbg(ehci, "hird %d invalid, use default 0",
+                       hird);
+                       hird = 0;
+               }
+               temp |= hird << 24;
+       }
        ehci->command = temp;
  
        /* Accept arbitrarily long scatter-gather lists */
-       hcd->self.sg_tablesize = ~0;
+       if (!(hcd->driver->flags & HCD_LOCAL_MEM))
+               hcd->self.sg_tablesize = ~0;
        return 0;
  }
  
@@@ -619,7 -649,6 +649,6 @@@ static int ehci_run (struct usb_hcd *hc
        u32                     hcc_params;
  
        hcd->uses_new_polling = 1;
-       hcd->poll_rh = 0;
  
        /* EHCI spec section 4.1 */
        if ((retval = ehci_reset(ehci)) != 0) {
@@@ -764,6 -793,7 +793,7 @@@ static irqreturn_t ehci_irq (struct usb
        /* remote wakeup [4.3.1] */
        if (status & STS_PCD) {
                unsigned        i = HCS_N_PORTS (ehci->hcs_params);
+               u32             ppcd = 0;
  
                /* kick root hub later */
                pcd_status = status;
                if (!(cmd & CMD_RUN))
                        usb_hcd_resume_root_hub(hcd);
  
+               /* get per-port change detect bits */
+               if (ehci->has_ppcd)
+                       ppcd = status >> 16;
                while (i--) {
-                       int pstatus = ehci_readl(ehci,
-                                                &ehci->regs->port_status [i]);
+                       int pstatus;
+                       /* leverage per-port change bits feature */
+                       if (ehci->has_ppcd && !(ppcd & (1 << i)))
+                               continue;
+                       pstatus = ehci_readl(ehci,
+                                        &ehci->regs->port_status[i]);
  
                        if (pstatus & PORT_OWNER)
                                continue;
@@@ -1041,6 -1080,7 +1080,6 @@@ nogood
        ep->hcpriv = NULL;
  done:
        spin_unlock_irqrestore (&ehci->lock, flags);
 -      return;
  }
  
  static void
index caf116c093762ebc06b8c2105032764b5d0e96dd,3e5630369c316ccabaddd137ad9b3abd7598034e..d0abb9b0e6732b19f40cc4cc011fecf2e9c33a04
@@@ -27,8 -27,8 +27,8 @@@
    *    * 32 transfer descriptors (called ETDs)
    *    * 4Kb of Data memory
    *
 -  * The data memory is shared between the host and fuction controlers
 -  * (but this driver only supports the host controler)
 +  * The data memory is shared between the host and function controllers
 +  * (but this driver only supports the host controller)
    *
    * So setting up a transfer involves:
    *    * Allocating a ETD
@@@ -1521,7 -1521,7 +1521,7 @@@ static int imx21_hc_reset(struct usb_hc
                        return -ETIMEDOUT;
                }
                spin_unlock_irq(&imx21->lock);
-               schedule_timeout(1);
+               schedule_timeout_uninterruptible(1);
                spin_lock_irq(&imx21->lock);
        }
        spin_unlock_irqrestore(&imx21->lock, flags);
index 3ceb097e165aedec77ad7ce2599ce7cc76d8ab8c,c3b4ccc7337b54577f6ae0d9c5ab934f9359d27f..15ae39d6cc2425706c2114bdb3efa5559acbc0b5
@@@ -212,7 -212,7 +212,7 @@@ static int ohci_urb_enqueue 
        spin_lock_irqsave (&ohci->lock, flags);
  
        /* don't submit to a dead HC */
-       if (!test_bit(HCD_FLAG_HW_ACCESSIBLE, &hcd->flags)) {
+       if (!HCD_HW_ACCESSIBLE(hcd)) {
                retval = -ENODEV;
                goto fail;
        }
@@@ -370,6 -370,7 +370,6 @@@ sanitize
        }
        ep->hcpriv = NULL;
        spin_unlock_irqrestore (&ohci->lock, flags);
 -      return;
  }
  
  static int ohci_get_frame (struct usb_hcd *hcd)
@@@ -684,7 -685,7 +684,7 @@@ retry
        }
  
        /* use rhsc irqs after khubd is fully initialized */
-       hcd->poll_rh = 1;
+       set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
        hcd->uses_new_polling = 1;
  
        /* start controller operations */
@@@ -821,7 -822,7 +821,7 @@@ static irqreturn_t ohci_irq (struct usb
        else if (ints & OHCI_INTR_RD) {
                ohci_vdbg(ohci, "resume detect\n");
                ohci_writel(ohci, OHCI_INTR_RD, &regs->intrstatus);
-               hcd->poll_rh = 1;
+               set_bit(HCD_FLAG_POLL_RH, &hcd->flags);
                if (ohci->autostop) {
                        spin_lock (&ohci->lock);
                        ohci_rh_resume (ohci);
index de9e1c35da45b6ea6c507c0b04b66364895c5b54,d9c85a29273714b67a3feee118aef6d14f940be1..8026dc85996cf10fa154208144246d6f421728b3
@@@ -544,6 -544,8 +544,6 @@@ static void oxu_buf_free(struct oxu_hc
        qtd->buffer = NULL;
  
        spin_unlock(&oxu->mem_lock);
 -
 -      return;
  }
  
  static inline void ehci_qtd_init(struct ehci_qtd *qtd, dma_addr_t dma)
@@@ -569,6 -571,8 +569,6 @@@ static inline void oxu_qtd_free(struct 
        oxu->qtd_used[index] = 0;
  
        spin_unlock(&oxu->mem_lock);
 -
 -      return;
  }
  
  static struct ehci_qtd *ehci_qtd_alloc(struct oxu_hcd *oxu)
@@@ -611,6 -615,8 +611,6 @@@ static void oxu_qh_free(struct oxu_hcd 
        oxu->qh_used[index] = 0;
  
        spin_unlock(&oxu->mem_lock);
 -
 -      return;
  }
  
  static void qh_destroy(struct kref *kref)
@@@ -687,6 -693,8 +687,6 @@@ static void oxu_murb_free(struct oxu_hc
        oxu->murb_used[index] = 0;
  
        spin_unlock(&oxu->mem_lock);
 -
 -      return;
  }
  
  static struct oxu_murb *oxu_murb_alloc(struct oxu_hcd *oxu)
@@@ -1633,8 -1641,7 +1633,7 @@@ static int submit_async(struct oxu_hcd  
  #endif
  
        spin_lock_irqsave(&oxu->lock, flags);
-       if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
-                              &oxu_to_hcd(oxu)->flags))) {
+       if (unlikely(!HCD_HW_ACCESSIBLE(oxu_to_hcd(oxu)))) {
                rc = -ESHUTDOWN;
                goto done;
        }
@@@ -2201,8 -2208,7 +2200,7 @@@ static int intr_submit(struct oxu_hcd *
  
        spin_lock_irqsave(&oxu->lock, flags);
  
-       if (unlikely(!test_bit(HCD_FLAG_HW_ACCESSIBLE,
-                              &oxu_to_hcd(oxu)->flags))) {
+       if (unlikely(!HCD_HW_ACCESSIBLE(oxu_to_hcd(oxu)))) {
                status = -ESHUTDOWN;
                goto done;
        }
@@@ -2707,7 -2713,6 +2705,6 @@@ static int oxu_run(struct usb_hcd *hcd
        u32 temp, hcc_params;
  
        hcd->uses_new_polling = 1;
-       hcd->poll_rh = 0;
  
        /* EHCI spec section 4.1 */
        retval = ehci_reset(oxu);
@@@ -3065,6 -3070,7 +3062,6 @@@ nogood
        ep->hcpriv = NULL;
  done:
        spin_unlock_irqrestore(&oxu->lock, flags);
 -      return;
  }
  
  static int oxu_get_frame(struct usb_hcd *hcd)
index d7e034a5e1f975ca3c049873b91cf8719643fcf0,aecf380f6ecc51abaae6fcb0bdd0cdf2e830d061..c5b571050d8cf707fda9c1bbbdbbc9e24867e7d0
@@@ -456,6 -456,7 +456,6 @@@ static void ftdi_elan_cancel_targets(st
  static void ftdi_elan_kick_command_queue(struct usb_ftdi *ftdi)
  {
          ftdi_command_queue_work(ftdi, 0);
 -        return;
  }
  
  static void ftdi_elan_command_work(struct work_struct *work)
  static void ftdi_elan_kick_respond_queue(struct usb_ftdi *ftdi)
  {
          ftdi_respond_queue_work(ftdi, 0);
 -        return;
  }
  
  static void ftdi_elan_respond_work(struct work_struct *work)
@@@ -648,7 -650,7 +648,7 @@@ static int ftdi_elan_open(struct inode 
  
  static int ftdi_elan_release(struct inode *inode, struct file *file)
  {
-         struct usb_ftdi *ftdi = (struct usb_ftdi *)file->private_data;
+         struct usb_ftdi *ftdi = file->private_data;
          if (ftdi == NULL)
                  return -ENODEV;
          up(&ftdi->sw_lock);        /* decrement the count on our device */
@@@ -671,7 -673,7 +671,7 @@@ static ssize_t ftdi_elan_read(struct fi
          int bytes_read = 0;
          int retry_on_empty = 10;
          int retry_on_timeout = 5;
-         struct usb_ftdi *ftdi = (struct usb_ftdi *)file->private_data;
+         struct usb_ftdi *ftdi = file->private_data;
          if (ftdi->disconnected > 0) {
                  return -ENODEV;
          }
index e34023ff5771b9bab9b46740ecf63532f3e0803d,eb12d9b096b4f54f803b9ee34e9302e694a799b8..4fc588cc471696a1c4bcb941ee293618beeacc35
@@@ -157,6 -157,9 +157,9 @@@ static struct usb_device_id id_table_co
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_5_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_6_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_SCS_DEVICE_7_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_USINT_CAT_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_USINT_WKEY_PID) },
+       { USB_DEVICE(FTDI_VID, FTDI_USINT_RS232_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_ACTZWAVE_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },
        { USB_DEVICE(FTDI_VID, FTDI_IPLUS_PID) },
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
        { USB_DEVICE(FTDI_VID, XVERVE_SIGNALYZER_SH4_PID),
                .driver_info = (kernel_ulong_t)&ftdi_jtag_quirk },
+       { USB_DEVICE(FTDI_VID, SEGWAY_RMP200_PID) },
        { },                                    /* Optional parameter entry */
        { }                                     /* Terminating entry */
  };
@@@ -2065,6 -2069,7 +2069,6 @@@ static void ftdi_set_termios(struct tty
                /* lower DTR/RTS */
                clear_mctrl(port, TIOCM_DTR | TIOCM_RTS);
        }
 -      return;
  }
  
  static int ftdi_tiocmget(struct tty_struct *tty, struct file *file)
index 4a6da66d5fd2940eb5f2d7e0e9da7e29c7a99735,dc47f986df57f739b18ceb121dc8f19b0acd8c23..9d6be304dff9c0b710a660204fa2f82b35d05ebe
@@@ -1298,7 -1298,7 +1298,7 @@@ static int download_fw(struct edgeport_
                                kfree(header);
                                kfree(rom_desc);
                                kfree(ti_manuf_desc);
-                               return status;
+                               return -EINVAL;
                        }
  
                        /* verify the write -- must do this in order for
                                kfree(header);
                                kfree(rom_desc);
                                kfree(ti_manuf_desc);
-                               return status;
+                               return -EINVAL;
                        }
  
                        kfree(vheader);
@@@ -1571,6 -1571,8 +1571,6 @@@ static void handle_new_msr(struct edgep
                }
        }
        tty_kref_put(tty);
 -
 -      return;
  }
  
  static void handle_new_lsr(struct edgeport_port *edge_port, int lsr_data,
@@@ -2422,6 -2424,7 +2422,6 @@@ static void change_port_settings(struc
                dbg("%s - error %d when trying to write config to device",
                     __func__, status);
        kfree(config);
 -      return;
  }
  
  static void edge_set_termios(struct tty_struct *tty,
                return;
        /* change the port settings to the new ones specified */
        change_port_settings(tty, edge_port, old_termios);
 -      return;
  }
  
  static int edge_tiocmset(struct tty_struct *tty, struct file *file,
index 55766a65f0ad1d6b75d536a5ffbbeec10db12c5e,efc72113216b2f365a647b6f1b7067b705bb085f..12ed594f5f808f63106ad4dedbcb9f7d35983237
@@@ -1,6 -1,8 +1,8 @@@
  /*
   * Infinity Unlimited USB Phoenix driver
   *
+  * Copyright (C) 2010 James Courtier-Dutton (James@superbug.co.uk)
   * Copyright (C) 2007 Alain Degreffe (eczema@ecze.com)
   *
   * Original code taken from iuutool (Copyright (C) 2006 Juan Carlos Borrás)
@@@ -40,7 -42,7 +42,7 @@@ static int debug
  /*
   * Version Information
   */
- #define DRIVER_VERSION "v0.11"
+ #define DRIVER_VERSION "v0.12"
  #define DRIVER_DESC "Infinity USB Unlimited Phoenix driver"
  
  static const struct usb_device_id id_table[] = {
@@@ -81,6 -83,9 +83,9 @@@ struct iuu_private 
        u8 *dbgbuf;             /* debug buffer */
        u8 len;
        int vcc;                /* vcc (either 3 or 5 V) */
+       u32 baud;
+       u32 boost;
+       u32 clk;
  };
  
  
@@@ -157,13 -162,14 +162,14 @@@ static int iuu_tiocmset(struct tty_stru
            port->number, set, clear);
  
        spin_lock_irqsave(&priv->lock, flags);
-       if (set & TIOCM_RTS)
-               priv->tiostatus = TIOCM_RTS;
  
-       if (!(set & TIOCM_RTS) && priv->tiostatus == TIOCM_RTS) {
+       if ((set & TIOCM_RTS) && !(priv->tiostatus == TIOCM_RTS)) {
                dbg("%s TIOCMSET RESET called !!!", __func__);
                priv->reset = 1;
        }
+       if (set & TIOCM_RTS)
+               priv->tiostatus = TIOCM_RTS;
        spin_unlock_irqrestore(&priv->lock, flags);
        return 0;
  }
@@@ -801,6 -807,7 +807,6 @@@ static void read_rxcmd_callback(struct 
                          iuu_uart_read_callback, port);
        result = usb_submit_urb(port->read_urb, GFP_ATOMIC);
        dbg("%s - submit result = %d", __func__, result);
 -      return;
  }
  
  static int iuu_uart_on(struct usb_serial_port *port)
@@@ -850,20 -857,24 +856,24 @@@ static int iuu_uart_off(struct usb_seri
        return status;
  }
  
- static int iuu_uart_baud(struct usb_serial_port *port, u32 baud,
+ static int iuu_uart_baud(struct usb_serial_port *port, u32 baud_base,
                         u32 *actual, u8 parity)
  {
        int status;
+       u32 baud;
        u8 *dataout;
        u8 DataCount = 0;
        u8 T1Frekvens = 0;
        u8 T1reload = 0;
        unsigned int T1FrekvensHZ = 0;
  
+       dbg("%s - enter baud_base=%d", __func__, baud_base);
        dataout = kmalloc(sizeof(u8) * 5, GFP_KERNEL);
  
        if (!dataout)
                return -ENOMEM;
+       /*baud = (((priv->clk / 35) * baud_base) / 100000); */
+       baud = baud_base;
  
        if (baud < 1200 || baud > 230400) {
                kfree(dataout);
@@@ -947,15 -958,20 +957,20 @@@ static void iuu_set_termios(struct tty_
                struct usb_serial_port *port, struct ktermios *old_termios)
  {
        const u32 supported_mask = CMSPAR|PARENB|PARODD;
+       struct iuu_private *priv = usb_get_serial_port_data(port);
        unsigned int cflag = tty->termios->c_cflag;
        int status;
        u32 actual;
        u32 parity;
        int csize = CS7;
-       int baud = 9600;        /* Fixed for the moment */
+       int baud;
        u32 newval = cflag & supported_mask;
  
+       /* Just use the ospeed. ispeed should be the same. */
+       baud = tty->termios->c_ospeed;
+       dbg("%s - enter c_ospeed or baud=%d", __func__, baud);
        /* compute the parity parameter */
        parity = 0;
        if (cflag & CMSPAR) {   /* Using mark space */
  
        /* set it */
        status = iuu_uart_baud(port,
-                       (clockmode == 2) ? 16457 : 9600 * boost / 100,
+                       baud * priv->boost / 100,
                        &actual, parity);
  
        /* set the termios value to the real one, so the user now what has
         * changed. We support few fields so its easies to copy the old hw
         * settings back over and then adjust them
         */
-       if (old_termios)
-               tty_termios_copy_hw(tty->termios, old_termios);
+       if (old_termios)
+               tty_termios_copy_hw(tty->termios, old_termios);
        if (status != 0)        /* Set failed - return old bits */
                return;
        /* Re-encode speed, parity and csize */
@@@ -1017,6 -1033,7 +1032,7 @@@ static void iuu_close(struct usb_serial
  
  static void iuu_init_termios(struct tty_struct *tty)
  {
+       dbg("%s - enter", __func__);
        *(tty->termios) = tty_std_termios;
        tty->termios->c_cflag = CLOCAL | CREAD | CS8 | B9600
                                | TIOCM_CTS | CSTOPB | PARENB;
@@@ -1032,10 -1049,16 +1048,16 @@@ static int iuu_open(struct tty_struct *
        struct usb_serial *serial = port->serial;
        u8 *buf;
        int result;
+       int baud;
        u32 actual;
        struct iuu_private *priv = usb_get_serial_port_data(port);
  
-       dbg("%s -  port %d", __func__, port->number);
+       baud = tty->termios->c_ospeed;
+       tty->termios->c_ispeed = baud;
+       /* Re-encode speed */
+       tty_encode_baud_rate(tty, baud, baud);
+       dbg("%s -  port %d, baud %d", __func__, port->number, baud);
        usb_clear_halt(serial->dev, port->write_urb->pipe);
        usb_clear_halt(serial->dev, port->read_urb->pipe);
  
        iuu_uart_on(port);
        if (boost < 100)
                boost = 100;
+       priv->boost = boost;
+       priv->baud = baud;
        switch (clockmode) {
        case 2:         /*  3.680 Mhz */
+               priv->clk = IUU_CLK_3680000;
                iuu_clk(port, IUU_CLK_3680000 * boost / 100);
                result =
-                   iuu_uart_baud(port, 9600 * boost / 100, &actual,
+                   iuu_uart_baud(port, baud * boost / 100, &actual,
                                  IUU_PARITY_EVEN);
                break;
        case 3:         /*  6.00 Mhz */
                iuu_clk(port, IUU_CLK_6000000 * boost / 100);
+               priv->clk = IUU_CLK_6000000;
+               /* Ratio of 6000000 to 3500000 for baud 9600 */
                result =
                    iuu_uart_baud(port, 16457 * boost / 100, &actual,
                                  IUU_PARITY_EVEN);
                break;
        default:                /*  3.579 Mhz */
                iuu_clk(port, IUU_CLK_3579000 * boost / 100);
+               priv->clk = IUU_CLK_3579000;
                result =
-                   iuu_uart_baud(port, 9600 * boost / 100, &actual,
+                   iuu_uart_baud(port, baud * boost / 100, &actual,
                                  IUU_PARITY_EVEN);
        }
  
diff --combined fs/exofs/inode.c
index 5862ae87ed298b7c8a49172f197001a534596008,088cb476b68a8c24c72bd2abf0503d9917667725..185ef1281e0cf8d1c0db0df27e4299c20aca96bb
@@@ -508,7 -508,7 +508,7 @@@ static int write_exec(struct page_colle
  
        pcol_copy = kmalloc(sizeof(*pcol_copy), GFP_KERNEL);
        if (!pcol_copy) {
 -              EXOFS_ERR("write_exec: Faild to kmalloc(pcol)\n");
 +              EXOFS_ERR("write_exec: Failed to kmalloc(pcol)\n");
                ret = -ENOMEM;
                goto err;
        }
  
        ret = exofs_oi_write(oi, ios);
        if (unlikely(ret)) {
 -              EXOFS_ERR("write_exec: exofs_oi_write() Faild\n");
 +              EXOFS_ERR("write_exec: exofs_oi_write() Failed\n");
                goto err;
        }
  
@@@ -625,7 -625,7 +625,7 @@@ try_again
                /* split the request, next loop will start again */
                ret = write_exec(pcol);
                if (unlikely(ret)) {
 -                      EXOFS_DBGMSG("write_exec faild => %d", ret);
 +                      EXOFS_DBGMSG("write_exec failed => %d", ret);
                        goto fail;
                }
  
@@@ -697,6 -697,13 +697,13 @@@ static int exofs_writepage(struct page 
        return write_exec(&pcol);
  }
  
+ /* i_mutex held using inode->i_size directly */
+ static void _write_failed(struct inode *inode, loff_t to)
+ {
+       if (to > inode->i_size)
+               truncate_pagecache(inode, to, inode->i_size);
+ }
  int exofs_write_begin(struct file *file, struct address_space *mapping,
                loff_t pos, unsigned len, unsigned flags,
                struct page **pagep, void **fsdata)
                ret = simple_write_begin(file, mapping, pos, len, flags, pagep,
                                         fsdata);
                if (ret) {
 -                      EXOFS_DBGMSG("simple_write_begin faild\n");
 +                      EXOFS_DBGMSG("simple_write_begin failed\n");
-                       return ret;
+                       goto out;
                }
  
                page = *pagep;
                if (ret) {
                        /*SetPageError was done by _readpage. Is it ok?*/
                        unlock_page(page);
 -                      EXOFS_DBGMSG("__readpage_filler faild\n");
 +                      EXOFS_DBGMSG("__readpage_filler failed\n");
                }
        }
+ out:
+       if (unlikely(ret))
+               _write_failed(mapping->host, pos + len);
  
        return ret;
  }
@@@ -750,6 -760,10 +760,10 @@@ static int exofs_write_end(struct file 
        int ret;
  
        ret = simple_write_end(file, mapping,pos, len, copied, page, fsdata);
+       if (unlikely(ret))
+               _write_failed(inode, pos + len);
+       /* TODO: once simple_write_end marks inode dirty remove */
        if (i_size != inode->i_size)
                mark_inode_dirty(inode);
        return ret;
@@@ -808,87 -822,55 +822,55 @@@ static inline int exofs_inode_is_fast_s
        return S_ISLNK(inode->i_mode) && (oi->i_data[0] != 0);
  }
  
- /*
-  * get_block_t - Fill in a buffer_head
-  * An OSD takes care of block allocation so we just fake an allocation by
-  * putting in the inode's sector_t in the buffer_head.
-  * TODO: What about the case of create==0 and @iblock does not exist in the
-  * object?
-  */
- static int exofs_get_block(struct inode *inode, sector_t iblock,
-                   struct buffer_head *bh_result, int create)
- {
-       map_bh(bh_result, inode->i_sb, iblock);
-       return 0;
- }
  const struct osd_attr g_attr_logical_length = ATTR_DEF(
        OSD_APAGE_OBJECT_INFORMATION, OSD_ATTR_OI_LOGICAL_LENGTH, 8);
  
- static int _do_truncate(struct inode *inode)
+ static int _do_truncate(struct inode *inode, loff_t newsize)
  {
        struct exofs_i_info *oi = exofs_i(inode);
-       loff_t isize = i_size_read(inode);
        int ret;
  
        inode->i_mtime = inode->i_ctime = CURRENT_TIME;
  
-       nobh_truncate_page(inode->i_mapping, isize, exofs_get_block);
+       ret = exofs_oi_truncate(oi, (u64)newsize);
+       if (likely(!ret))
+               truncate_setsize(inode, newsize);
  
-       ret = exofs_oi_truncate(oi, (u64)isize);
-       EXOFS_DBGMSG("(0x%lx) size=0x%llx\n", inode->i_ino, isize);
+       EXOFS_DBGMSG("(0x%lx) size=0x%llx ret=>%d\n",
+                    inode->i_ino, newsize, ret);
        return ret;
  }
  
  /*
-  * Truncate a file to the specified size - all we have to do is set the size
-  * attribute.  We make sure the object exists first.
-  */
- void exofs_truncate(struct inode *inode)
- {
-       struct exofs_i_info *oi = exofs_i(inode);
-       int ret;
-       if (!(S_ISREG(inode->i_mode) || S_ISDIR(inode->i_mode)
-            || S_ISLNK(inode->i_mode)))
-               return;
-       if (exofs_inode_is_fast_symlink(inode))
-               return;
-       if (IS_APPEND(inode) || IS_IMMUTABLE(inode))
-               return;
-       /* if we are about to truncate an object, and it hasn't been
-        * created yet, wait
-        */
-       if (unlikely(wait_obj_created(oi)))
-               goto fail;
-       ret = _do_truncate(inode);
-       if (ret)
-               goto fail;
- out:
-       mark_inode_dirty(inode);
-       return;
- fail:
-       make_bad_inode(inode);
-       goto out;
- }
- /*
-  * Set inode attributes - just call generic functions.
+  * Set inode attributes - update size attribute on OSD if needed,
+  *                        otherwise just call generic functions.
   */
  int exofs_setattr(struct dentry *dentry, struct iattr *iattr)
  {
        struct inode *inode = dentry->d_inode;
        int error;
  
+       /* if we are about to modify an object, and it hasn't been
+        * created yet, wait
+        */
+       error = wait_obj_created(exofs_i(inode));
+       if (unlikely(error))
+               return error;
        error = inode_change_ok(inode, iattr);
-       if (error)
+       if (unlikely(error))
                return error;
  
-       error = inode_setattr(inode, iattr);
-       return error;
+       if ((iattr->ia_valid & ATTR_SIZE) &&
+           iattr->ia_size != i_size_read(inode)) {
+               error = _do_truncate(inode, iattr->ia_size);
+               if (unlikely(error))
+                       return error;
+       }
+       setattr_copy(inode, iattr);
+       mark_inode_dirty(inode);
+       return 0;
  }
  
  static const struct osd_attr g_attr_inode_file_layout = ATTR_DEF(
@@@ -1112,7 -1094,7 +1094,7 @@@ static void create_done(struct exofs_io
        atomic_dec(&sbi->s_curr_pending);
  
        if (unlikely(ret)) {
 -              EXOFS_ERR("object=0x%llx creation faild in pid=0x%llx",
 +              EXOFS_ERR("object=0x%llx creation failed in pid=0x%llx",
                          _LLU(exofs_oi_objno(oi)), _LLU(sbi->layout.s_pid));
                /*TODO: When FS is corrupted creation can fail, object already
                 * exist. Get rid of this asynchronous creation, if exist
@@@ -1232,7 -1214,7 +1214,7 @@@ static int exofs_update_inode(struct in
  
        args = kzalloc(sizeof(*args), GFP_KERNEL);
        if (!args) {
 -              EXOFS_DBGMSG("Faild kzalloc of args\n");
 +              EXOFS_DBGMSG("Failed kzalloc of args\n");
                return -ENOMEM;
        }
  
@@@ -1325,7 -1307,7 +1307,7 @@@ static void delete_done(struct exofs_io
   * from the OSD here.  We make sure the object was created before we try and
   * delete it.
   */
- void exofs_delete_inode(struct inode *inode)
+ void exofs_evict_inode(struct inode *inode)
  {
        struct exofs_i_info *oi = exofs_i(inode);
        struct super_block *sb = inode->i_sb;
  
        truncate_inode_pages(&inode->i_data, 0);
  
-       if (is_bad_inode(inode))
+       /* TODO: should do better here */
+       if (inode->i_nlink || is_bad_inode(inode))
                goto no_delete;
  
-       mark_inode_dirty(inode);
-       exofs_update_inode(inode, inode_needs_sync(inode));
        inode->i_size = 0;
-       if (inode->i_blocks)
-               exofs_truncate(inode);
+       end_writeback(inode);
  
-       clear_inode(inode);
+       /* if we are deleting an obj that hasn't been created yet, wait */
+       if (!obj_created(oi)) {
+               BUG_ON(!obj_2bcreated(oi));
+               wait_event(oi->i_wq, obj_created(oi));
+               /* ignore the error attempt a remove anyway */
+       }
  
+       /* Now Remove the OSD objects */
        ret = exofs_get_io_state(&sbi->layout, &ios);
        if (unlikely(ret)) {
                EXOFS_ERR("%s: exofs_get_io_state failed\n", __func__);
                return;
        }
  
-       /* if we are deleting an obj that hasn't been created yet, wait */
-       if (!obj_created(oi)) {
-               BUG_ON(!obj_2bcreated(oi));
-               wait_event(oi->i_wq, obj_created(oi));
-       }
        ios->obj.id = exofs_oi_objno(oi);
        ios->done = delete_done;
        ios->private = sbi;
        return;
  
  no_delete:
-       clear_inode(inode);
+       end_writeback(inode);
  }
diff --combined fs/exofs/ios.c
index 95921f501f2fec5cffea20c8e37743a149d58ab5,e2732203fa9373c2443dcff83fce7b0e4af516bc..908cdbe4b99ae8e1054a563f94a479ad1b2b45c8
@@@ -55,7 -55,7 +55,7 @@@ int exofs_read_kern(struct osd_dev *od
  
        ret = osd_finalize_request(or, 0, cred, NULL);
        if (unlikely(ret)) {
 -              EXOFS_DBGMSG("Faild to osd_finalize_request() => %d\n", ret);
 +              EXOFS_DBGMSG("Failed to osd_finalize_request() => %d\n", ret);
                goto out;
        }
  
@@@ -79,7 -79,7 +79,7 @@@ int exofs_get_io_state(struct exofs_lay
         */
        ios = kzalloc(exofs_io_state_size(layout->s_numdevs), GFP_KERNEL);
        if (unlikely(!ios)) {
 -              EXOFS_DBGMSG("Faild kzalloc bytes=%d\n",
 +              EXOFS_DBGMSG("Failed kzalloc bytes=%d\n",
                             exofs_io_state_size(layout->s_numdevs));
                *pios = NULL;
                return -ENOMEM;
@@@ -172,7 -172,7 +172,7 @@@ static int exofs_io_execute(struct exof
  
                ret = osd_finalize_request(or, 0, ios->cred, NULL);
                if (unlikely(ret)) {
 -                      EXOFS_DBGMSG("Faild to osd_finalize_request() => %d\n",
 +                      EXOFS_DBGMSG("Failed to osd_finalize_request() => %d\n",
                                     ret);
                        return ret;
                }
@@@ -365,7 -365,7 +365,7 @@@ static int _add_stripe_unit(struct exof
  
                per_dev->bio = bio_kmalloc(GFP_KERNEL, bio_size);
                if (unlikely(!per_dev->bio)) {
 -                      EXOFS_DBGMSG("Faild to allocate BIO size=%u\n",
 +                      EXOFS_DBGMSG("Failed to allocate BIO size=%u\n",
                                     bio_size);
                        return -ENOMEM;
                }
@@@ -584,7 -584,7 +584,7 @@@ static int _sbi_write_mirror(struct exo
                                                  master_dev->bio->bi_max_vecs);
                                if (unlikely(!bio)) {
                                        EXOFS_DBGMSG(
 -                                            "Faild to allocate BIO size=%u\n",
 +                                            "Failed to allocate BIO size=%u\n",
                                              master_dev->bio->bi_max_vecs);
                                        ret = -ENOMEM;
                                        goto out;
                        } else {
                                bio = master_dev->bio;
                                /* FIXME: bio_set_dir() */
-                               bio->bi_rw |= (1 << BIO_RW);
+                               bio->bi_rw |= REQ_WRITE;
                        }
  
                        osd_req_write(or, &ios->obj, per_dev->offset, bio,
This page took 0.051952 seconds and 5 git commands to generate.