|
@@ -759,7 +759,10 @@ static int uas_eh_bus_reset_handler(struct scsi_cmnd *cmnd)
|
|
|
|
|
|
static int uas_slave_alloc(struct scsi_device *sdev)
|
|
static int uas_slave_alloc(struct scsi_device *sdev)
|
|
{
|
|
{
|
|
- sdev->hostdata = (void *)sdev->host->hostdata;
|
|
|
|
|
|
+ struct uas_dev_info *devinfo =
|
|
|
|
+ (struct uas_dev_info *)sdev->host->hostdata;
|
|
|
|
+
|
|
|
|
+ sdev->hostdata = devinfo;
|
|
|
|
|
|
/* USB has unusual DMA-alignment requirements: Although the
|
|
/* USB has unusual DMA-alignment requirements: Although the
|
|
* starting address of each scatter-gather element doesn't matter,
|
|
* starting address of each scatter-gather element doesn't matter,
|
|
@@ -778,6 +781,11 @@ static int uas_slave_alloc(struct scsi_device *sdev)
|
|
*/
|
|
*/
|
|
blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
|
|
blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
|
|
|
|
|
|
|
|
+ if (devinfo->flags & US_FL_MAX_SECTORS_64)
|
|
|
|
+ blk_queue_max_hw_sectors(sdev->request_queue, 64);
|
|
|
|
+ else if (devinfo->flags & US_FL_MAX_SECTORS_240)
|
|
|
|
+ blk_queue_max_hw_sectors(sdev->request_queue, 240);
|
|
|
|
+
|
|
return 0;
|
|
return 0;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -887,8 +895,9 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|
struct Scsi_Host *shost = NULL;
|
|
struct Scsi_Host *shost = NULL;
|
|
struct uas_dev_info *devinfo;
|
|
struct uas_dev_info *devinfo;
|
|
struct usb_device *udev = interface_to_usbdev(intf);
|
|
struct usb_device *udev = interface_to_usbdev(intf);
|
|
|
|
+ unsigned long dev_flags;
|
|
|
|
|
|
- if (!uas_use_uas_driver(intf, id))
|
|
|
|
|
|
+ if (!uas_use_uas_driver(intf, id, &dev_flags))
|
|
return -ENODEV;
|
|
return -ENODEV;
|
|
|
|
|
|
if (uas_switch_interface(udev, intf))
|
|
if (uas_switch_interface(udev, intf))
|
|
@@ -910,8 +919,7 @@ static int uas_probe(struct usb_interface *intf, const struct usb_device_id *id)
|
|
devinfo->udev = udev;
|
|
devinfo->udev = udev;
|
|
devinfo->resetting = 0;
|
|
devinfo->resetting = 0;
|
|
devinfo->shutdown = 0;
|
|
devinfo->shutdown = 0;
|
|
- devinfo->flags = id->driver_info;
|
|
|
|
- usb_stor_adjust_quirks(udev, &devinfo->flags);
|
|
|
|
|
|
+ devinfo->flags = dev_flags;
|
|
init_usb_anchor(&devinfo->cmd_urbs);
|
|
init_usb_anchor(&devinfo->cmd_urbs);
|
|
init_usb_anchor(&devinfo->sense_urbs);
|
|
init_usb_anchor(&devinfo->sense_urbs);
|
|
init_usb_anchor(&devinfo->data_urbs);
|
|
init_usb_anchor(&devinfo->data_urbs);
|