Commit bceadddd authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: keucr: fix up US_ macro change

The usb tree renamed the USB storage defines to make more sense, so this
driver needs the changes as well so that things will compile properly.
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e4c5bf8e
...@@ -30,7 +30,7 @@ static int slave_alloc(struct scsi_device *sdev) ...@@ -30,7 +30,7 @@ static int 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 (us->subclass == US_SC_UFI) if (us->subclass == USB_SC_UFI)
sdev->sdev_target->pdt_1f_for_no_lun = 1; sdev->sdev_target->pdt_1f_for_no_lun = 1;
return 0; return 0;
...@@ -55,7 +55,7 @@ static int slave_configure(struct scsi_device *sdev) ...@@ -55,7 +55,7 @@ static int slave_configure(struct scsi_device *sdev)
if (sdev->type == TYPE_DISK) if (sdev->type == TYPE_DISK)
{ {
if (us->subclass != US_SC_SCSI && us->subclass != US_SC_CYP_ATACB) if (us->subclass != USB_SC_SCSI && us->subclass != USB_SC_CYP_ATACB)
sdev->use_10_for_ms = 1; sdev->use_10_for_ms = 1;
sdev->use_192_bytes_for_3f = 1; sdev->use_192_bytes_for_3f = 1;
if (us->fflags & US_FL_NO_WP_DETECT) if (us->fflags & US_FL_NO_WP_DETECT)
...@@ -76,7 +76,7 @@ static int slave_configure(struct scsi_device *sdev) ...@@ -76,7 +76,7 @@ static int slave_configure(struct scsi_device *sdev)
sdev->use_10_for_ms = 1; sdev->use_10_for_ms = 1;
} }
if ((us->protocol == US_PR_CB || us->protocol == US_PR_CBI) && sdev->scsi_level == SCSI_UNKNOWN) if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_CBI) && sdev->scsi_level == SCSI_UNKNOWN)
us->max_lun = 0; us->max_lun = 0;
if (us->fflags & US_FL_NOT_LOCKABLE) if (us->fflags & US_FL_NOT_LOCKABLE)
......
...@@ -315,7 +315,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) ...@@ -315,7 +315,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
/* Determine if we need to auto-sense */ /* Determine if we need to auto-sense */
need_auto_sense = 0; need_auto_sense = 0;
if ((us->protocol == US_PR_CB || us->protocol == US_PR_DPCM_USB) && srb->sc_data_direction != DMA_FROM_DEVICE) if ((us->protocol == USB_PR_CB || us->protocol == USB_PR_DPCM_USB) && srb->sc_data_direction != DMA_FROM_DEVICE)
{ {
//printk("-- CB transport device requiring auto-sense\n"); //printk("-- CB transport device requiring auto-sense\n");
need_auto_sense = 1; need_auto_sense = 1;
...@@ -338,7 +338,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us) ...@@ -338,7 +338,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
scsi_eh_prep_cmnd(srb, &ses, NULL, 0, US_SENSE_SIZE); scsi_eh_prep_cmnd(srb, &ses, NULL, 0, US_SENSE_SIZE);
/* we must do the protocol translation here */ /* we must do the protocol translation here */
if (us->subclass == US_SC_RBC || us->subclass == US_SC_SCSI || us->subclass == US_SC_CYP_ATACB) if (us->subclass == USB_SC_RBC || us->subclass == USB_SC_SCSI || us->subclass == USB_SC_CYP_ATACB)
srb->cmd_len = 6; srb->cmd_len = 6;
else else
srb->cmd_len = 12; srb->cmd_len = 12;
......
...@@ -343,7 +343,7 @@ static int get_transport(struct us_data *us) ...@@ -343,7 +343,7 @@ static int get_transport(struct us_data *us)
{ {
printk("usb --- get_transport\n"); printk("usb --- get_transport\n");
switch (us->protocol) { switch (us->protocol) {
case US_PR_BULK: case USB_PR_BULK:
us->transport_name = "Bulk"; us->transport_name = "Bulk";
us->transport = usb_stor_Bulk_transport; us->transport = usb_stor_Bulk_transport;
us->transport_reset = usb_stor_Bulk_reset; us->transport_reset = usb_stor_Bulk_reset;
...@@ -367,7 +367,7 @@ static int get_protocol(struct us_data *us) ...@@ -367,7 +367,7 @@ static int get_protocol(struct us_data *us)
printk("us->pusb_dev->descriptor.idVendor = %x\n", us->pusb_dev->descriptor.idVendor); printk("us->pusb_dev->descriptor.idVendor = %x\n", us->pusb_dev->descriptor.idVendor);
printk("us->pusb_dev->descriptor.idProduct = %x\n", us->pusb_dev->descriptor.idProduct); printk("us->pusb_dev->descriptor.idProduct = %x\n", us->pusb_dev->descriptor.idProduct);
switch (us->subclass) { switch (us->subclass) {
case US_SC_SCSI: case USB_SC_SCSI:
us->protocol_name = "Transparent SCSI"; us->protocol_name = "Transparent SCSI";
if( (us->pusb_dev->descriptor.idVendor == 0x0CF2) && (us->pusb_dev->descriptor.idProduct == 0x6250) ) if( (us->pusb_dev->descriptor.idVendor == 0x0CF2) && (us->pusb_dev->descriptor.idProduct == 0x6250) )
us->proto_handler = ENE_stor_invoke_transport; us->proto_handler = ENE_stor_invoke_transport;
...@@ -418,7 +418,7 @@ static int get_pipes(struct us_data *us) ...@@ -418,7 +418,7 @@ static int get_pipes(struct us_data *us)
} }
} }
if (!ep_in || !ep_out || (us->protocol == US_PR_CBI && !ep_int)) if (!ep_in || !ep_out || (us->protocol == USB_PR_CBI && !ep_int))
{ {
printk("Endpoint sanity check failed! Rejecting dev.\n"); printk("Endpoint sanity check failed! Rejecting dev.\n");
return -EIO; return -EIO;
...@@ -564,7 +564,7 @@ static int usb_stor_scan_thread(void * __us) ...@@ -564,7 +564,7 @@ static int usb_stor_scan_thread(void * __us)
if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags)) if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags))
{ {
/* For bulk-only devices, determine the max LUN value */ /* For bulk-only devices, determine the max LUN value */
if (us->protocol == US_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN)) if (us->protocol == USB_PR_BULK && !(us->fflags & US_FL_SINGLE_LUN))
{ {
mutex_lock(&us->dev_mutex); mutex_lock(&us->dev_mutex);
us->max_lun = usb_stor_Bulk_max_lun(us); us->max_lun = usb_stor_Bulk_max_lun(us);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment