Skip to content

Commit

Permalink
Staging: keucr: fix up US_ macro change
Browse files Browse the repository at this point in the history
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: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Greg Kroah-Hartman committed Oct 28, 2010
1 parent e4c5bf8 commit bceaddd
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/keucr/scsiglue.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ static int slave_alloc(struct scsi_device *sdev)

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;

return 0;
Expand All @@ -55,7 +55,7 @@ static int slave_configure(struct scsi_device *sdev)

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_192_bytes_for_3f = 1;
if (us->fflags & US_FL_NO_WP_DETECT)
Expand All @@ -76,7 +76,7 @@ static int slave_configure(struct scsi_device *sdev)
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;

if (us->fflags & US_FL_NOT_LOCKABLE)
Expand Down
4 changes: 2 additions & 2 deletions drivers/staging/keucr/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,7 +315,7 @@ void usb_stor_invoke_transport(struct scsi_cmnd *srb, struct us_data *us)
/* Determine if we need to auto-sense */
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");
need_auto_sense = 1;
Expand All @@ -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);

/* 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;
else
srb->cmd_len = 12;
Expand Down
8 changes: 4 additions & 4 deletions drivers/staging/keucr/usb.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ static int get_transport(struct us_data *us)
{
printk("usb --- get_transport\n");
switch (us->protocol) {
case US_PR_BULK:
case USB_PR_BULK:
us->transport_name = "Bulk";
us->transport = usb_stor_Bulk_transport;
us->transport_reset = usb_stor_Bulk_reset;
Expand All @@ -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.idProduct = %x\n", us->pusb_dev->descriptor.idProduct);
switch (us->subclass) {
case US_SC_SCSI:
case USB_SC_SCSI:
us->protocol_name = "Transparent SCSI";
if( (us->pusb_dev->descriptor.idVendor == 0x0CF2) && (us->pusb_dev->descriptor.idProduct == 0x6250) )
us->proto_handler = ENE_stor_invoke_transport;
Expand Down Expand Up @@ -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");
return -EIO;
Expand Down Expand Up @@ -564,7 +564,7 @@ static int usb_stor_scan_thread(void * __us)
if (!test_bit(US_FLIDX_DONT_SCAN, &us->dflags))
{
/* 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);
us->max_lun = usb_stor_Bulk_max_lun(us);
Expand Down

0 comments on commit bceaddd

Please sign in to comment.