summaryrefslogtreecommitdiff
path: root/cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c
diff options
context:
space:
mode:
Diffstat (limited to 'cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c')
-rw-r--r--cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c b/cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c
index 8c1e2954f3..38b93ecbfa 100644
--- a/cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c
+++ b/cleopatre/linux-2.6.25.10-spc300/drivers/usb/storage/scsiglue.c
@@ -60,6 +60,8 @@
#include "debug.h"
#include "transport.h"
#include "protocol.h"
+#include "../host/ehci-mstar.h"
+
/***********************************************************************
* Host functions
@@ -89,6 +91,10 @@ static int slave_alloc (struct scsi_device *sdev)
* mask. Guaranteeing proper alignment of the first buffer will
* have the desired effect because, except at the beginning and
* the end, scatter-gather buffers follow page boundaries. */
+#if defined(MSTAR_PATCH_HOTPLUG) && defined(MSTAR_PATCH_USB_HCD)
+ //tony if disconnect, update will cause kernel panic
+ if(us->pusb_dev->devnum1==us->pusb_dev->devnum)
+#endif
blk_queue_update_dma_alignment(sdev->request_queue, (512 - 1));
/*
@@ -122,7 +128,20 @@ static int slave_configure(struct scsi_device *sdev)
if (sdev->request_queue->max_sectors > max_sectors)
blk_queue_max_sectors(sdev->request_queue,
max_sectors);
+#if defined(MSTAR_PATCH_HOTPLUG) && defined(MSTAR_PATCH_USB_HCD)
+ } else if (sdev->type == TYPE_TAPE) {
+ /* Tapes need much higher max_sector limits, so just
+ * raise it to the maximum possible (4 GB / 512) and
+ * let the queue segment size sort out the real limit.
+ */
+ blk_queue_max_sectors(sdev->request_queue, 0x7FFFFF);
+ }
+#ifdef CONFIG_HIGHMEM
+ blk_queue_bounce_limit(sdev->request_queue, BLK_BOUNCE_HIGH);
+#endif
+#else
}
+#endif
/* We can't put these settings in slave_alloc() because that gets
* called before the device type is known. Consequently these