Re: Problem with aacraid driver in 2.5.63-bk-latest

Denis Vlasenko <[email protected]>
Newsgroups gmane.linux.kernel,gmane.linux.scsi,gmane.linux.drivers.aacraid.devel
Message-ID <[email protected]>
On 13 March 2003 02:50, Mike Anderson wrote:
> The patch below is something Patrick and I where discussing though I
> believe he indicated that I should print out the value we where
> setting the queue_depth to. It was only compiled and not tested on
> any devices.
>
> -andmike

--- 1.96/drivers/scsi/scsi.c    Fri Feb 21 13:46:58 2003
+++ edited/drivers/scsi/scsi.c  Wed Mar 12 16:05:42 2003
@@ -926,15 +926,28 @@
        /*
         * refuse to set tagged depth to an unworkable size
         */
-       if(tags <= 0)
-               return;
+       if(tags <= 0) {
+                       printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
+                               "%s, tag value to small\n"
+                               "disabled\n", SDpnt->host->host_no,

Please do not split message into several lines.
There are several reasons why you shouldn't do it.

+                               SDpnt->channel, SDpnt->id, SDpnt->lun,
+                               __FUNCTION__); 
+
+               SDpnt->queue_depth = 1;
+       }
        /*
-        * Limit max queue depth on a single lun to 256 for now.  Remember,
-        * we allocate a struct scsi_command for each of these and keep it
-        * around forever.  Too deep of a depth just wastes memory.
+        * Limit max queue depth on a single lun to 256 for now.
+        * Too deep of a depth just wastes memory.
         */
-       if(tags > 256)
-               return;
+       if(tags > 256) {
+                       printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
+                               "%s, tag value to big\n"
+                               "disabled\n", SDpnt->host->host_no,

Same here.

+                               SDpnt->channel, SDpnt->id, SDpnt->lun,
+                               __FUNCTION__); 
+
+               SDpnt->queue_depth = 256;
+       }
 
        spin_lock_irqsave(&device_request_lock, flags);
        SDpnt->queue_depth = tags;
@@ -949,9 +962,10 @@
                        break;
                default:
                        printk(KERN_WARNING "(scsi%d:%d:%d:%d) "
-                               "scsi_adjust_queue_depth, bad queue type, "
+                               "%s, bad queue type, "
                                "disabled\n", SDpnt->host->host_no,
-                               SDpnt->channel, SDpnt->id, SDpnt->lun); 
+                               SDpnt->channel, SDpnt->id, SDpnt->lun,
+                               __FUNCTION__); 
                case 0:
                        SDpnt->ordered_tags = SDpnt->simple_tags = 0;
                        SDpnt->queue_depth = tags;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.