aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/gadget/file_storage.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-23 21:35:04 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-08-23 21:35:04 -0700
commit9e1a3e31cbfd5f5822e633c4bdf3304079cb10c2 (patch)
tree88653393c17c0ac5c0b30a244d6e6dc97b314e1f /drivers/usb/gadget/file_storage.c
parentde80af4cc9c30318224b8520dc76a7d097e64cbd (diff)
parentd65cc1b45e7d3a24c25fd3d730042e407d6d64ce (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6: (35 commits) usb: add PRODUCT, TYPE to usb-interface events USB: resubmission unusual_devs modification for Nikon D80 usb quirks: Add Canon EOS 5D (PC Connection mode) to the autosuspend blacklist USB: make EHCI initialize properly on PPC SOCs UEAGLE: Remove sysfs files on error case USB: fsl_usb2_udc: fix bug in processing setup requests USB: g_file_storage: fix bug in DMA buffer handling USB: update last_busy field correctly USB: fix DoS in pwc USB video driver USB: allow retry on descriptor fetch errors USB: unkill cxacru atm driver USB: Adding support for HTC Smartphones to ipaq USB: another quirky device USB: quirky mass storage device USB: ohci, fix oddball gcc warning usb-storage: fix bugs in the disconnect pathway usb: typo in usb R8A66597 HCD config USB: accept 1-byte Device Status replies, fixing some b0rken devices USB: blacklist Samsung ML-2010 printer usb-serial: fix oti6858.c segfault in termios handling ...
Diffstat (limited to 'drivers/usb/gadget/file_storage.c')
-rw-r--r--drivers/usb/gadget/file_storage.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/usb/gadget/file_storage.c b/drivers/usb/gadget/file_storage.c
index be7a1bd2823..965ad7bec7b 100644
--- a/drivers/usb/gadget/file_storage.c
+++ b/drivers/usb/gadget/file_storage.c
@@ -599,7 +599,6 @@ enum fsg_buffer_state {
struct fsg_buffhd {
void *buf;
- dma_addr_t dma;
enum fsg_buffer_state state;
struct fsg_buffhd *next;
@@ -1295,6 +1294,7 @@ static int class_setup_req(struct fsg_dev *fsg,
struct usb_request *req = fsg->ep0req;
int value = -EOPNOTSUPP;
u16 w_index = le16_to_cpu(ctrl->wIndex);
+ u16 w_value = le16_to_cpu(ctrl->wValue);
u16 w_length = le16_to_cpu(ctrl->wLength);
if (!fsg->config)
@@ -1308,7 +1308,7 @@ static int class_setup_req(struct fsg_dev *fsg,
if (ctrl->bRequestType != (USB_DIR_OUT |
USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
- if (w_index != 0) {
+ if (w_index != 0 || w_value != 0) {
value = -EDOM;
break;
}
@@ -1324,7 +1324,7 @@ static int class_setup_req(struct fsg_dev *fsg,
if (ctrl->bRequestType != (USB_DIR_IN |
USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
- if (w_index != 0) {
+ if (w_index != 0 || w_value != 0) {
value = -EDOM;
break;
}
@@ -1343,7 +1343,7 @@ static int class_setup_req(struct fsg_dev *fsg,
if (ctrl->bRequestType != (USB_DIR_OUT |
USB_TYPE_CLASS | USB_RECIP_INTERFACE))
break;
- if (w_index != 0) {
+ if (w_index != 0 || w_value != 0) {
value = -EDOM;
break;
}
@@ -2611,7 +2611,6 @@ static int send_status(struct fsg_dev *fsg)
fsg->intr_buffhd = bh; // Point to the right buffhd
fsg->intreq->buf = bh->inreq->buf;
- fsg->intreq->dma = bh->inreq->dma;
fsg->intreq->context = bh;
start_transfer(fsg, fsg->intr_in, fsg->intreq,
&fsg->intreq_busy, &bh->state);
@@ -3200,7 +3199,6 @@ reset:
if ((rc = alloc_request(fsg, fsg->bulk_out, &bh->outreq)) != 0)
goto reset;
bh->inreq->buf = bh->outreq->buf = bh->buf;
- bh->inreq->dma = bh->outreq->dma = bh->dma;
bh->inreq->context = bh->outreq->context = bh;
bh->inreq->complete = bulk_in_complete;
bh->outreq->complete = bulk_out_complete;