]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-for-linus-2.6
authorLinus Torvalds <torvalds@g5.osdl.org>
Mon, 24 Oct 2005 00:13:14 +0000 (17:13 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Mon, 24 Oct 2005 00:13:14 +0000 (17:13 -0700)
drivers/scsi/NCR5380.c
drivers/scsi/aacraid/aacraid.h
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_lib.c
drivers/scsi/scsi_transport_fc.c

index d40ba0bd68a3b776699f62ff56e9b9ba89059950..23392ae7df8b319984fa0fd5d569e92422a72aab 100644 (file)
@@ -91,7 +91,7 @@
 #ifndef NDEBUG
 #define NDEBUG 0
 #endif
-#ifndef NDEBUG
+#ifndef NDEBUG_ABORT
 #define NDEBUG_ABORT 0
 #endif
 
index 4a99d2f000f4a952a720ce0e7866b406c255ba09..d54b1cc88d0d9cf67ec56e48ea8a3efc9cd7ffc5 100644 (file)
@@ -19,7 +19,7 @@
 #define AAC_MAX_LUN            (8)
 
 #define AAC_MAX_HOSTPHYSMEMPAGES (0xfffff)
-#define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)512)
+#define AAC_MAX_32BIT_SGBCOUNT ((unsigned short)256)
 
 /*
  * These macros convert from physical channels to virtual channels
index 64fc9e21f35b1ca9987e98a713058a911d8f2b77..e69477d1889bd8e6ab67f862f99d9c3ccc8de7af 100644 (file)
@@ -185,6 +185,7 @@ static struct {
        {"PIONEER", "CD-ROM DRM-600", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"PIONEER", "CD-ROM DRM-602X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"PIONEER", "CD-ROM DRM-604X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
+       {"PIONEER", "CD-ROM DRM-624X", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"REGAL", "CDC-4X", NULL, BLIST_MAX5LUN | BLIST_SINGLELUN},
        {"SanDisk", "ImageMate CF-SD1", NULL, BLIST_FORCELUN},
        {"SEAGATE", "ST34555N", "0930", BLIST_NOTQ},    /* Chokes on tagged INQUIRY */
index dc9c772bc874073b9d6fa38fda47a12faf7c463b..0074f28c37b2719e49388a0da93f6a9a87505a82 100644 (file)
@@ -97,7 +97,6 @@ int scsi_insert_special_req(struct scsi_request *sreq, int at_head)
 }
 
 static void scsi_run_queue(struct request_queue *q);
-static void scsi_release_buffers(struct scsi_cmnd *cmd);
 
 /*
  * Function:   scsi_unprep_request()
@@ -1040,8 +1039,10 @@ static int scsi_init_io(struct scsi_cmnd *cmd)
         * if sg table allocation fails, requeue request later.
         */
        sgpnt = scsi_alloc_sgtable(cmd, GFP_ATOMIC);
-       if (unlikely(!sgpnt))
+       if (unlikely(!sgpnt)) {
+               scsi_unprep_request(req);
                return BLKPREP_DEFER;
+       }
 
        cmd->request_buffer = (char *) sgpnt;
        cmd->request_bufflen = req->nr_sectors << 9;
@@ -1245,8 +1246,8 @@ static int scsi_prep_fn(struct request_queue *q, struct request *req)
                 */
                ret = scsi_init_io(cmd);
                switch(ret) {
+                       /* For BLKPREP_KILL/DEFER the cmd was released */
                case BLKPREP_KILL:
-                       /* BLKPREP_KILL return also releases the command */
                        goto kill;
                case BLKPREP_DEFER:
                        goto defer;
index 2cab556b6e82afa886203254b16024783e47f8c5..771e97ef136e8ad3c27f08eab77c76de77b8a2ac 100644 (file)
@@ -819,12 +819,15 @@ show_fc_private_host_tgtid_bind_type(struct class_device *cdev, char *buf)
        return snprintf(buf, FC_BINDTYPE_MAX_NAMELEN, "%s\n", name);
 }
 
+#define get_list_head_entry(pos, head, member)                 \
+       pos = list_entry((head)->next, typeof(*pos), member)
+
 static ssize_t
 store_fc_private_host_tgtid_bind_type(struct class_device *cdev,
        const char *buf, size_t count)
 {
        struct Scsi_Host *shost = transport_class_to_shost(cdev);
-       struct fc_rport *rport, *next_rport;
+       struct fc_rport *rport;
        enum fc_tgtid_binding_type val;
        unsigned long flags;
 
@@ -834,9 +837,13 @@ store_fc_private_host_tgtid_bind_type(struct class_device *cdev,
        /* if changing bind type, purge all unused consistent bindings */
        if (val != fc_host_tgtid_bind_type(shost)) {
                spin_lock_irqsave(shost->host_lock, flags);
-               list_for_each_entry_safe(rport, next_rport,
-                               &fc_host_rport_bindings(shost), peers)
+               while (!list_empty(&fc_host_rport_bindings(shost))) {
+                       get_list_head_entry(rport,
+                               &fc_host_rport_bindings(shost), peers);
+                       spin_unlock_irqrestore(shost->host_lock, flags);
                        fc_rport_terminate(rport);
+                       spin_lock_irqsave(shost->host_lock, flags);
+               }
                spin_unlock_irqrestore(shost->host_lock, flags);
        }