Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316878
b: refs/heads/master
c: bdd000f
h: refs/heads/master
v: v3
  • Loading branch information
Gerd Hoffmann authored and Greg Kroah-Hartman committed Jun 25, 2012
1 parent 4ba9d9b commit c32d7ef
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8aac863e9295c42683b5b39ab65e17711e21b34c
refs/heads/master: bdd000fb34202530e5cd11260d06f57e2daf63c9
9 changes: 9 additions & 0 deletions trunk/drivers/usb/storage/uas.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ struct sense_iu_old {
struct uas_dev_info {
struct usb_interface *intf;
struct usb_device *udev;
struct usb_anchor sense_urbs;
struct usb_anchor data_urbs;
int qdepth;
unsigned cmd_pipe, status_pipe, data_in_pipe, data_out_pipe;
unsigned use_streams:1;
Expand Down Expand Up @@ -396,6 +398,7 @@ static int uas_submit_sense_urb(struct Scsi_Host *shost,
usb_free_urb(urb);
return SCSI_MLQUEUE_DEVICE_BUSY;
}
usb_anchor_urb(urb, &devinfo->sense_urbs);
return 0;
}

Expand Down Expand Up @@ -431,6 +434,7 @@ static int uas_submit_urbs(struct scsi_cmnd *cmnd,
}
cmdinfo->state &= ~SUBMIT_DATA_IN_URB;
cmdinfo->state |= DATA_IN_URB_INFLIGHT;
usb_anchor_urb(cmdinfo->data_in_urb, &devinfo->data_urbs);
}

if (cmdinfo->state & ALLOC_DATA_OUT_URB) {
Expand All @@ -450,6 +454,7 @@ static int uas_submit_urbs(struct scsi_cmnd *cmnd,
}
cmdinfo->state &= ~SUBMIT_DATA_OUT_URB;
cmdinfo->state |= DATA_OUT_URB_INFLIGHT;
usb_anchor_urb(cmdinfo->data_out_urb, &devinfo->data_urbs);
}

if (cmdinfo->state & ALLOC_CMD_URB) {
Expand Down Expand Up @@ -761,6 +766,8 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)

devinfo->intf = intf;
devinfo->udev = udev;
init_usb_anchor(&devinfo->sense_urbs);
init_usb_anchor(&devinfo->data_urbs);
uas_configure_endpoints(devinfo);

result = scsi_init_shared_tag_map(shost, devinfo->qdepth - 2);
Expand Down Expand Up @@ -804,6 +811,8 @@ static void uas_disconnect(struct usb_interface *intf)
struct uas_dev_info *devinfo = (void *)shost->hostdata[0];

scsi_remove_host(shost);
usb_kill_anchored_urbs(&devinfo->sense_urbs);
usb_kill_anchored_urbs(&devinfo->data_urbs);
uas_free_streams(devinfo);
kfree(devinfo);
}
Expand Down

0 comments on commit c32d7ef

Please sign in to comment.