aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/sddr09.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/sddr09.c')
-rw-r--r--drivers/usb/storage/sddr09.c43
1 files changed, 43 insertions, 0 deletions
diff --git a/drivers/usb/storage/sddr09.c b/drivers/usb/storage/sddr09.c
index c5a54b872c24..531ae5c5abf3 100644
--- a/drivers/usb/storage/sddr09.c
+++ b/drivers/usb/storage/sddr09.c
@@ -45,6 +45,7 @@
45 45
46#include <scsi/scsi.h> 46#include <scsi/scsi.h>
47#include <scsi/scsi_cmnd.h> 47#include <scsi/scsi_cmnd.h>
48#include <scsi/scsi_device.h>
48 49
49#include "usb.h" 50#include "usb.h"
50#include "transport.h" 51#include "transport.h"
@@ -1446,6 +1447,48 @@ usb_stor_sddr09_dpcm_init(struct us_data *us) {
1446} 1447}
1447 1448
1448/* 1449/*
1450 * Transport for the Microtech DPCM-USB
1451 */
1452int dpcm_transport(struct scsi_cmnd *srb, struct us_data *us)
1453{
1454 int ret;
1455
1456 US_DEBUGP("dpcm_transport: LUN=%d\n", srb->device->lun);
1457
1458 switch (srb->device->lun) {
1459 case 0:
1460
1461 /*
1462 * LUN 0 corresponds to the CompactFlash card reader.
1463 */
1464 ret = usb_stor_CB_transport(srb, us);
1465 break;
1466
1467 case 1:
1468
1469 /*
1470 * LUN 1 corresponds to the SmartMedia card reader.
1471 */
1472
1473 /*
1474 * Set the LUN to 0 (just in case).
1475 */
1476 srb->device->lun = 0;
1477 ret = sddr09_transport(srb, us);
1478 srb->device->lun = 1;
1479 break;
1480
1481 default:
1482 US_DEBUGP("dpcm_transport: Invalid LUN %d\n",
1483 srb->device->lun);
1484 ret = USB_STOR_TRANSPORT_ERROR;
1485 break;
1486 }
1487 return ret;
1488}
1489
1490
1491/*
1449 * Transport for the Sandisk SDDR-09 1492 * Transport for the Sandisk SDDR-09
1450 */ 1493 */
1451int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us) 1494int sddr09_transport(struct scsi_cmnd *srb, struct us_data *us)