1fbf60802SJu, SeokmannRelease Date : Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@lsil.com> 2fbf60802SJu, SeokmannCurrent Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module) 3fbf60802SJu, SeokmannOlder Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) 4fbf60802SJu, Seokmann 5fbf60802SJu, Seokmann1. Fixed a bug in megaraid_init_mbox(). 6fbf60802SJu, Seokmann Customer reported "garbage in file on x86_64 platform". 7fbf60802SJu, Seokmann Root Cause: the driver registered controllers as 64-bit DMA capable 8fbf60802SJu, Seokmann for those which are not support it. 9fbf60802SJu, Seokmann Fix: Made change in the function inserting identification machanism 10fbf60802SJu, Seokmann identifying 64-bit DMA capable controllers. 11fbf60802SJu, Seokmann 12fbf60802SJu, Seokmann > -----Original Message----- 13fbf60802SJu, Seokmann > From: Vasily Averin [mailto:vvs@sw.ru] 14fbf60802SJu, Seokmann > Sent: Thursday, May 04, 2006 2:49 PM 15fbf60802SJu, Seokmann > To: linux-scsi@vger.kernel.org; Kolli, Neela; Mukker, Atul; 16fbf60802SJu, Seokmann > Ju, Seokmann; Bagalkote, Sreenivas; 17fbf60802SJu, Seokmann > James.Bottomley@SteelEye.com; devel@openvz.org 18fbf60802SJu, Seokmann > Subject: megaraid_mbox: garbage in file 19fbf60802SJu, Seokmann > 20fbf60802SJu, Seokmann > Hello all, 21fbf60802SJu, Seokmann > 22fbf60802SJu, Seokmann > I've investigated customers claim on the unstable work of 23fbf60802SJu, Seokmann > their node and found a 24fbf60802SJu, Seokmann > strange effect: reading from some files leads to the 25fbf60802SJu, Seokmann > "attempt to access beyond end of device" messages. 26fbf60802SJu, Seokmann > 27fbf60802SJu, Seokmann > I've checked filesystem, memory on the node, motherboard BIOS 28fbf60802SJu, Seokmann > version, but it 29fbf60802SJu, Seokmann > does not help and issue still has been reproduced by simple 30fbf60802SJu, Seokmann > file reading. 31fbf60802SJu, Seokmann > 32fbf60802SJu, Seokmann > Reproducer is simple: 33fbf60802SJu, Seokmann > 34fbf60802SJu, Seokmann > echo 0xffffffff >/proc/sys/dev/scsi/logging_level ; 35fbf60802SJu, Seokmann > cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt ; 36fbf60802SJu, Seokmann > echo 0 >/proc/sys/dev/scsi/logging 37fbf60802SJu, Seokmann > 38fbf60802SJu, Seokmann > It leads to the following messages in dmesg 39fbf60802SJu, Seokmann > 40fbf60802SJu, Seokmann > sd_init_command: disk=sda, block=871769260, count=26 41fbf60802SJu, Seokmann > sda : block=871769260 42fbf60802SJu, Seokmann > sda : reading 26/26 512 byte blocks. 43fbf60802SJu, Seokmann > scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420) 44fbf60802SJu, Seokmann > sd 0:1:0:0: send 0xf79ed980 sd 0:1:0:0: 45fbf60802SJu, Seokmann > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 46fbf60802SJu, Seokmann > buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40, 47fbf60802SJu, Seokmann > queuecommand 0xc0344010 48fbf60802SJu, Seokmann > leaving scsi_dispatch_cmnd() 49fbf60802SJu, Seokmann > scsi_delete_timer: scmd: f79ed980, rtn: 1 50fbf60802SJu, Seokmann > sd 0:1:0:0: done 0xf79ed980 SUCCESS 0 sd 0:1:0:0: 51fbf60802SJu, Seokmann > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 52fbf60802SJu, Seokmann > scsi host busy 1 failed 0 53fbf60802SJu, Seokmann > sd 0:1:0:0: Notifying upper driver of completion (result 0) 54fbf60802SJu, Seokmann > sd_rw_intr: sda: res=0x0 55fbf60802SJu, Seokmann > 26 sectors total, 13312 bytes done. 56fbf60802SJu, Seokmann > use_sg is 4 57fbf60802SJu, Seokmann > attempt to access beyond end of device 58fbf60802SJu, Seokmann > sda6: rw=0, want=1044134458, limit=951401367 59fbf60802SJu, Seokmann > Buffer I/O error on device sda6, logical block 522067228 60fbf60802SJu, Seokmann > attempt to access beyond end of device 61fbf60802SJu, Seokmann 62*aa677bc7SJu, Seokmann2. When INQUIRY with EVPD bit set issued to the MegaRAID controller, 63*aa677bc7SJu, Seokmann system memory gets corrupted. 64*aa677bc7SJu, Seokmann Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set 65*aa677bc7SJu, Seokmann incorrectly. 66*aa677bc7SJu, Seokmann Fix: MegaRAID F/W has fixed the problem and being process of release, 67*aa677bc7SJu, Seokmann soon. Meanwhile, driver will filter out the request. 68*aa677bc7SJu, Seokmann 69c005fb4fSJu, SeokmannRelease Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com> 70c005fb4fSJu, SeokmannCurrent Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) 71c005fb4fSJu, SeokmannOlder Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) 72c005fb4fSJu, Seokmann 73c005fb4fSJu, Seokmann1. Fixed a bug in megaraid_reset_handler(). 74c005fb4fSJu, Seokmann Customer reported "Unable to handle kernel NULL pointer dereference 75c005fb4fSJu, Seokmann at virtual address 00000000" when system goes to reset condition 76c005fb4fSJu, Seokmann for some reason. It happened randomly. 77c005fb4fSJu, Seokmann Root Cause: in the megaraid_reset_handler(), there is possibility not 78c005fb4fSJu, Seokmann returning pending packets in the pend_list if there are multiple 79c005fb4fSJu, Seokmann pending packets. 80c005fb4fSJu, Seokmann Fix: Made the change in the driver so that it will return all packets 81c005fb4fSJu, Seokmann in the pend_list. 82c005fb4fSJu, Seokmann 83c005fb4fSJu, Seokmann2. Added change request. 84c005fb4fSJu, Seokmann As found in the following URL, rmb() only didn't help the 85c005fb4fSJu, Seokmann problem. I had to increase the loop counter to 0xFFFFFF. (6 F's) 86c005fb4fSJu, Seokmann http://marc.theaimsgroup.com/?l=linux-scsi&m=110971060502497&w=2 87c005fb4fSJu, Seokmann 88c005fb4fSJu, Seokmann I attached a patch for your reference, too. 89c005fb4fSJu, Seokmann Could you check and get this fix in your driver? 90c005fb4fSJu, Seokmann 91c005fb4fSJu, Seokmann Best Regards, 92c005fb4fSJu, Seokmann Jun'ichi Nomura 93c005fb4fSJu, Seokmann 94ed7e8ef7SJu, SeokmannRelease Date : Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> 95ed7e8ef7SJu, SeokmannCurrent Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) 96ed7e8ef7SJu, SeokmannOlder Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) 97ed7e8ef7SJu, Seokmann 98ed7e8ef7SJu, Seokmann1. Sorted out PCI IDs to remove megaraid support overlaps. 99ed7e8ef7SJu, Seokmann Based on the patch from Daniel, sorted out PCI IDs along with 100ed7e8ef7SJu, Seokmann charactor node name change from 'megadev' to 'megadev_legacy' to avoid 101ed7e8ef7SJu, Seokmann conflict. 102ed7e8ef7SJu, Seokmann --- 103ed7e8ef7SJu, Seokmann Hopefully we'll be getting the build restriction zapped much sooner, 104ed7e8ef7SJu, Seokmann but we should also be thinking about totally removing the hardware 105ed7e8ef7SJu, Seokmann support overlap in the megaraid drivers. 106ed7e8ef7SJu, Seokmann 107ed7e8ef7SJu, Seokmann This patch pencils in a date of Feb 06 for this, and performs some 108ed7e8ef7SJu, Seokmann printk abuse in hope that existing legacy users might pick up on what's 109ed7e8ef7SJu, Seokmann going on. 110ed7e8ef7SJu, Seokmann 111ed7e8ef7SJu, Seokmann Signed-off-by: Daniel Drake <dsd@gentoo.org> 112ed7e8ef7SJu, Seokmann --- 113ed7e8ef7SJu, Seokmann 114ed7e8ef7SJu, Seokmann2. Fixed a issue: megaraid always fails to reset handler. 115ed7e8ef7SJu, Seokmann --- 116ed7e8ef7SJu, Seokmann I found that the megaraid driver always fails to reset the 117ed7e8ef7SJu, Seokmann adapter with the following message: 118ed7e8ef7SJu, Seokmann megaraid: resetting the host... 119ed7e8ef7SJu, Seokmann megaraid mbox: reset sequence completed successfully 120ed7e8ef7SJu, Seokmann megaraid: fast sync command timed out 121ed7e8ef7SJu, Seokmann megaraid: reservation reset failed 122ed7e8ef7SJu, Seokmann when the "Cluster mode" of the adapter BIOS is enabled. 123ed7e8ef7SJu, Seokmann So, whenever the reset occurs, the adapter goes to 124ed7e8ef7SJu, Seokmann offline and just become unavailable. 125ed7e8ef7SJu, Seokmann 126ed7e8ef7SJu, Seokmann Jun'ichi Nomura [mailto:jnomura@mtc.biglobe.ne.jp] 127ed7e8ef7SJu, Seokmann --- 128ed7e8ef7SJu, Seokmann 129672b2d38SJu, Seokmann Release Date : Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> 130672b2d38SJu, Seokmann Current Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) 131672b2d38SJu, Seokmann Older Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) 132672b2d38SJu, Seokmann 133672b2d38SJu, Seokmann 1. Added IOCTL backward compatibility. 134672b2d38SJu, Seokmann Convert megaraid_mm driver to new compat_ioctl entry points. 135672b2d38SJu, Seokmann I don't have easy access to hardware, so only compile tested. 136672b2d38SJu, Seokmann - Signed-off-by:Andi Kleen <ak@muc.de> 137672b2d38SJu, Seokmann 138672b2d38SJu, Seokmann 2. megaraid_mbox fix: wrong order of arguments in memset() 139672b2d38SJu, Seokmann That, BTW, shows why cross-builds are useful-the only indication of 140672b2d38SJu, Seokmann problem had been a new warning showing up in sparse output on alpha 141672b2d38SJu, Seokmann build (number of exceeding 256 got truncated). 142672b2d38SJu, Seokmann - Signed-off-by: Al Viro 143672b2d38SJu, Seokmann <viro@parcelfarce.linux.theplanet.co.uk> 144672b2d38SJu, Seokmann 145672b2d38SJu, Seokmann 3. Convert pci_module_init to pci_register_driver 146672b2d38SJu, Seokmann Convert from pci_module_init to pci_register_driver 147672b2d38SJu, Seokmann (from:http://kerneljanitors.org/TODO) 148672b2d38SJu, Seokmann - Signed-off-by: Domen Puncer <domen@coderock.org> 149672b2d38SJu, Seokmann 150672b2d38SJu, Seokmann 4. Use the pre defined DMA mask constants from dma-mapping.h 151672b2d38SJu, Seokmann Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling 152672b2d38SJu, Seokmann pci_set_dma_mask() or pci_set_consistend_dma_mask(). See 153672b2d38SJu, Seokmann http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for more 154672b2d38SJu, Seokmann details. 155672b2d38SJu, Seokmann Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> 156672b2d38SJu, Seokmann Signed-off-by: Domen Puncer <domen@coderock.org> 157672b2d38SJu, Seokmann 158672b2d38SJu, Seokmann 5. Remove SSID checking for Dobson, Lindsay, and Verde based products. 159672b2d38SJu, Seokmann Checking the SSVID/SSID for controllers which have Dobson, Lindsay, 160672b2d38SJu, Seokmann and Verde is unnecessary because device ID has been assigned by LSI 161672b2d38SJu, Seokmann and it is unique value. So, all controllers with these IOPs have to be 162672b2d38SJu, Seokmann supported by the driver regardless SSVID/SSID. 163672b2d38SJu, Seokmann 164672b2d38SJu, Seokmann 6. Date Thu, 27 Jan 2005 04:31:09 +0100 165672b2d38SJu, Seokmann From Herbert Poetzl <> 166672b2d38SJu, Seokmann Subject RFC: assert_spin_locked() for 2.6 167672b2d38SJu, Seokmann 168672b2d38SJu, Seokmann Greetings! 169672b2d38SJu, Seokmann 170672b2d38SJu, Seokmann overcautious programming will kill your kernel ;) 171672b2d38SJu, Seokmann ever thought about checking a spin_lock or even 172672b2d38SJu, Seokmann asserting that it must be held (maybe just for 173672b2d38SJu, Seokmann spinlock debugging?) ... 174672b2d38SJu, Seokmann 175672b2d38SJu, Seokmann there are several checks present in the kernel 176672b2d38SJu, Seokmann where somebody does a variation on the following: 177672b2d38SJu, Seokmann 178672b2d38SJu, Seokmann BUG_ON(!spin_is_locked(&some_lock)); 179672b2d38SJu, Seokmann 180672b2d38SJu, Seokmann so what's wrong about that? nothing, unless you 181672b2d38SJu, Seokmann compile the code with CONFIG_DEBUG_SPINLOCK but 182672b2d38SJu, Seokmann without CONFIG_SMP ... in which case the BUG() 183672b2d38SJu, Seokmann will kill your kernel ... 184672b2d38SJu, Seokmann 185672b2d38SJu, Seokmann maybe it's not advised to make such assertions, 186672b2d38SJu, Seokmann but here is a solution which works for me ... 187672b2d38SJu, Seokmann (compile tested for sh, x86_64 and x86, boot/run 188672b2d38SJu, Seokmann tested for x86 only) 189672b2d38SJu, Seokmann 190672b2d38SJu, Seokmann best, 191672b2d38SJu, Seokmann Herbert 192672b2d38SJu, Seokmann 193672b2d38SJu, Seokmann - Herbert Poetzl <herbert@13thfloor.at>, Thu, 27 Jan 2005 194672b2d38SJu, Seokmann 1951da177e4SLinus TorvaldsRelease Date : Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> 1961da177e4SLinus TorvaldsCurrent Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) 1971da177e4SLinus TorvaldsOlder Version : 2.20.4.4 (scsi module), 2.20.2.4 (cmm module) 1981da177e4SLinus Torvalds 1991da177e4SLinus Torvalds1. Modified name of two attributes in scsi_host_template. 2001da177e4SLinus Torvalds On Wed, 2005-02-02 at 10:56 -0500, Ju, Seokmann wrote: 2011da177e4SLinus Torvalds > + .sdev_attrs = megaraid_device_attrs, 2021da177e4SLinus Torvalds > + .shost_attrs = megaraid_class_device_attrs, 2031da177e4SLinus Torvalds 2041da177e4SLinus Torvalds These are, perhaps, slightly confusing names. 2051da177e4SLinus Torvalds The terms device and class_device have well defined meanings in the 2061da177e4SLinus Torvalds generic device model, neither of which is what you mean here. 2071da177e4SLinus Torvalds Why not simply megaraid_sdev_attrs and megaraid_shost_attrs? 2081da177e4SLinus Torvalds 2091da177e4SLinus Torvalds Other than this, it looks fine to me too. 2101da177e4SLinus Torvalds 2111da177e4SLinus TorvaldsRelease Date : Thu Jan 27 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com> 2121da177e4SLinus TorvaldsCurrent Version : 2.20.4.4 (scsi module), 2.20.2.5 (cmm module) 2131da177e4SLinus TorvaldsOlder Version : 2.20.4.3 (scsi module), 2.20.2.4 (cmm module) 2141da177e4SLinus Torvalds 2151da177e4SLinus Torvalds1. Bump up the version of scsi module due to its conflict. 2161da177e4SLinus Torvalds 2171da177e4SLinus TorvaldsRelease Date : Thu Jan 21 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com> 2181da177e4SLinus TorvaldsCurrent Version : 2.20.4.3 (scsi module), 2.20.2.5 (cmm module) 2191da177e4SLinus TorvaldsOlder Version : 2.20.4.2 (scsi module), 2.20.2.4 (cmm module) 2201da177e4SLinus Torvalds 2211da177e4SLinus Torvalds1. Remove driver ioctl for logical drive to scsi address translation and 2221da177e4SLinus Torvalds replace with the sysfs attribute. To remove drives and change 2231da177e4SLinus Torvalds capacity, application shall now use the device attribute to get the 2241da177e4SLinus Torvalds logical drive number for a scsi device. For adding newly created 2251da177e4SLinus Torvalds logical drives, class device attribute would be required to uniquely 2261da177e4SLinus Torvalds identify each controller. 2271da177e4SLinus Torvalds - Atul Mukker <atulm@lsil.com> 2281da177e4SLinus Torvalds 2291da177e4SLinus Torvalds "James, I've been thinking about this a little more, and you may be on 2301da177e4SLinus Torvalds to something here. Let each driver add files as such:" 2311da177e4SLinus Torvalds 2321da177e4SLinus Torvalds - Matt Domsch <Matt_Domsch@dell.com>, 12.15.2004 2331da177e4SLinus Torvalds linux-scsi mailing list 2341da177e4SLinus Torvalds 2351da177e4SLinus Torvalds 2361da177e4SLinus Torvalds "Then, if you simply publish your LD number as an extra parameter of 2371da177e4SLinus Torvalds the device, you can look through /sys to find it." 2381da177e4SLinus Torvalds 2391da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 01.03.2005 2401da177e4SLinus Torvalds linux-scsi mailing list 2411da177e4SLinus Torvalds 2421da177e4SLinus Torvalds 2431da177e4SLinus Torvalds "I don't see why not ... it's your driver, you can publish whatever 2441da177e4SLinus Torvalds extra information you need as scsi_device attributes; that was one of 2451da177e4SLinus Torvalds the designs of the extensible attribute system." 2461da177e4SLinus Torvalds 2471da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 01.06.2005 2481da177e4SLinus Torvalds linux-scsi mailing list 2491da177e4SLinus Torvalds 2501da177e4SLinus Torvalds2. Add AMI megaraid support - Brian King <brking@charter.net> 2511da177e4SLinus Torvalds PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3, 2521da177e4SLinus Torvalds PCI_VENDOR_ID_AMI, PCI_SUBSYS_ID_PERC3_DC, 2531da177e4SLinus Torvalds 2541da177e4SLinus Torvalds3. Make some code static - Adrian Bunk <bunk@stusta.de> 2551da177e4SLinus Torvalds Date: Mon, 15 Nov 2004 03:14:57 +0100 2561da177e4SLinus Torvalds 2571da177e4SLinus Torvalds The patch below makes some needlessly global code static. 2581da177e4SLinus Torvalds -wait_queue_head_t wait_q; 2591da177e4SLinus Torvalds +static wait_queue_head_t wait_q; 2601da177e4SLinus Torvalds 2611da177e4SLinus Torvalds Signed-off-by: Adrian Bunk <bunk@stusta.de> 2621da177e4SLinus Torvalds 2631da177e4SLinus Torvalds4. Added NEC ROMB support - NEC MegaRAID PCI Express ROMB controller 2641da177e4SLinus Torvalds PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E, 2651da177e4SLinus Torvalds PCI_SUBSYS_ID_NEC, PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E, 2661da177e4SLinus Torvalds 2671da177e4SLinus Torvalds5. Fixed Tape drive issue : For any Direct CDB command to physical device 2681da177e4SLinus Torvalds including tape, timeout value set by driver was 10 minutes. With this 2691da177e4SLinus Torvalds value, most of command will return within timeout. However, for those 2701da177e4SLinus Torvalds command like ERASE or FORMAT, it takes more than an hour depends on 2711da177e4SLinus Torvalds capacity of the device and the command could be terminated before it 2721da177e4SLinus Torvalds completes. 2731da177e4SLinus Torvalds To address this issue, the 'timeout' field in the DCDB command will 2741da177e4SLinus Torvalds have NO TIMEOUT (i.e., 4) value as its timeout on DCDB command. 2751da177e4SLinus Torvalds 2761da177e4SLinus Torvalds 2771da177e4SLinus Torvalds 2781da177e4SLinus TorvaldsRelease Date : Thu Dec 9 19:10:23 EST 2004 2791da177e4SLinus Torvalds - Sreenivas Bagalkote <sreenib@lsil.com> 2801da177e4SLinus Torvalds 2811da177e4SLinus TorvaldsCurrent Version : 2.20.4.2 (scsi module), 2.20.2.4 (cmm module) 2821da177e4SLinus TorvaldsOlder Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module) 2831da177e4SLinus Torvalds 2841da177e4SLinus Torvaldsi. Introduced driver ioctl that returns scsi address for a given ld. 2851da177e4SLinus Torvalds 2861da177e4SLinus Torvalds "Why can't the existing sysfs interfaces be used to do this?" 2871da177e4SLinus Torvalds - Brian King (brking@us.ibm.com) 2881da177e4SLinus Torvalds 2891da177e4SLinus Torvalds "I've looked into solving this another way, but I cannot see how 2901da177e4SLinus Torvalds to get this driver-private mapping of logical drive number-> HCTL 2911da177e4SLinus Torvalds without putting code something like this into the driver." 2921da177e4SLinus Torvalds 2931da177e4SLinus Torvalds "...and by providing a mapping a function to userspace, the driver 2941da177e4SLinus Torvalds is free to change its mapping algorithm in the future if necessary .." 2951da177e4SLinus Torvalds - Matt Domsch (Matt_Domsch@dell.com) 2961da177e4SLinus Torvalds 2971da177e4SLinus TorvaldsRelease Date : Thu Dec 9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com> 2981da177e4SLinus Torvalds 2991da177e4SLinus TorvaldsCurrent Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module) 3001da177e4SLinus TorvaldsOlder Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module) 3011da177e4SLinus Torvalds 3021da177e4SLinus Torvaldsi. Fix a bug in kioc's dma buffer deallocation 3031da177e4SLinus Torvalds 3041da177e4SLinus TorvaldsRelease Date : Thu Nov 4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com> 3051da177e4SLinus Torvalds 3061da177e4SLinus TorvaldsCurrent Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module) 3071da177e4SLinus TorvaldsOlder Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module) 3081da177e4SLinus Torvalds 3091da177e4SLinus Torvaldsi. Handle IOCTL cmd timeouts more properly. 3101da177e4SLinus Torvalds 3111da177e4SLinus Torvaldsii. pci_dma_sync_{sg,single}_for_cpu was introduced into megaraid_mbox 3121da177e4SLinus Torvalds incorrectly (instead of _for_device). Changed to appropriate 3131da177e4SLinus Torvalds pci_dma_sync_{sg,single}_for_device. 3141da177e4SLinus Torvalds 3151da177e4SLinus TorvaldsRelease Date : Wed Oct 06 11:15:29 EDT 2004 - Sreenivas Bagalkote <sreenib@lsil.com> 3161da177e4SLinus TorvaldsCurrent Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module) 3171da177e4SLinus TorvaldsOlder Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module) 3181da177e4SLinus Torvalds 3191da177e4SLinus Torvaldsi. Remove CONFIG_COMPAT around register_ioctl32_conversion 3201da177e4SLinus Torvalds 3211da177e4SLinus TorvaldsRelease Date : Mon Sep 27 22:15:07 EDT 2004 - Atul Mukker <atulm@lsil.com> 3221da177e4SLinus TorvaldsCurrent Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module) 3231da177e4SLinus TorvaldsOlder Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module) 3241da177e4SLinus Torvalds 3251da177e4SLinus Torvaldsi. Fix data corruption. Because of a typo in the driver, the IO packets 3261da177e4SLinus Torvalds were wrongly shared by the ioctl path. This causes a whole IO command 3271da177e4SLinus Torvalds to be replaced by an incoming ioctl command. 3281da177e4SLinus Torvalds 3291da177e4SLinus TorvaldsRelease Date : Tue Aug 24 09:43:35 EDT 2004 - Atul Mukker <atulm@lsil.com> 3301da177e4SLinus TorvaldsCurrent Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module) 3311da177e4SLinus TorvaldsOlder Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module) 3321da177e4SLinus Torvalds 3331da177e4SLinus Torvaldsi. Function reordering so that inline functions are defined before they 3341da177e4SLinus Torvalds are actually used. It is now mandatory for GCC 3.4.1 (current stable) 3351da177e4SLinus Torvalds 3361da177e4SLinus Torvalds Declare some heavy-weight functions to be non-inlined, 3371da177e4SLinus Torvalds megaraid_mbox_build_cmd, megaraid_mbox_runpendq, 3381da177e4SLinus Torvalds megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru, 3391da177e4SLinus Torvalds megaraid_busywait_mbox 3401da177e4SLinus Torvalds 3411da177e4SLinus Torvalds - Andrew Morton <akpm@osdl.org>, 08.19.2004 3421da177e4SLinus Torvalds linux-scsi mailing list 3431da177e4SLinus Torvalds 3441da177e4SLinus Torvalds "Something else to clean up after inclusion: every instance of an 3451da177e4SLinus Torvalds inline function is actually rendered as a full function call, because 3461da177e4SLinus Torvalds the function is always used before it is defined. Atul, please 3471da177e4SLinus Torvalds re-arrange the code to eliminate the need for most (all) of the 3481da177e4SLinus Torvalds function prototypes at the top of each file, and define (not just 3491da177e4SLinus Torvalds declare with a prototype) each inline function before its first use" 3501da177e4SLinus Torvalds 3511da177e4SLinus Torvalds - Matt Domsch <Matt_Domsch@dell.com>, 07.27.2004 3521da177e4SLinus Torvalds linux-scsi mailing list 3531da177e4SLinus Torvalds 3541da177e4SLinus Torvalds 3551da177e4SLinus Torvaldsii. Display elapsed time (countdown) while waiting for FW to boot. 3561da177e4SLinus Torvalds 3571da177e4SLinus Torvaldsiii. Module compilation reorder in Makefile so that unresolved symbols do 3581da177e4SLinus Torvalds not occur when driver is compiled non-modular. 3591da177e4SLinus Torvalds 3601da177e4SLinus Torvalds Patrick J. LoPresti <patl@users.sourceforge.net>, 8.22.2004 3611da177e4SLinus Torvalds linux-scsi mailing list 3621da177e4SLinus Torvalds 3631da177e4SLinus Torvalds 3641da177e4SLinus TorvaldsRelease Date : Thu Aug 19 09:58:33 EDT 2004 - Atul Mukker <atulm@lsil.com> 3651da177e4SLinus TorvaldsCurrent Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module) 3661da177e4SLinus TorvaldsOlder Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module) 3671da177e4SLinus Torvalds 3681da177e4SLinus Torvaldsi. When copying the mailbox packets, copy only first 14 bytes (for 32-bit 3691da177e4SLinus Torvalds mailboxes) and only first 22 bytes (for 64-bit mailboxes). This is to 3701da177e4SLinus Torvalds avoid getting the stale values for busy bit. We want to set the busy 3711da177e4SLinus Torvalds bit just before issuing command to the FW. 3721da177e4SLinus Torvalds 3731da177e4SLinus Torvaldsii. In the reset handling, if the reseted command is not owned by the 3741da177e4SLinus Torvalds driver, do not (wrongly) print information for the "attached" driver 3751da177e4SLinus Torvalds packet. 3761da177e4SLinus Torvalds 3771da177e4SLinus Torvaldsiii. Have extended wait when issuing command in synchronous mode. This is 3781da177e4SLinus Torvalds required for the cases where the option ROM is disabled and there is 3791da177e4SLinus Torvalds no BIOS to start the controller. The FW starts to boot after receiving 3801da177e4SLinus Torvalds the first command from the driver. The current driver has 1 second 3811da177e4SLinus Torvalds timeout for the synchronous commands, which is far less than what is 3821da177e4SLinus Torvalds actually required. We now wait up to MBOX_RESET_TIME (180 seconds) for 3831da177e4SLinus Torvalds FW boot process. 3841da177e4SLinus Torvalds 3851da177e4SLinus Torvaldsiv. In megaraid_mbox_product_info, clear the mailbox contents completely 3861da177e4SLinus Torvalds before preparing the command for inquiry3. This is to ensure that the 3871da177e4SLinus Torvalds FW does not get junk values in the command. 3881da177e4SLinus Torvalds 3891da177e4SLinus Torvaldsv. Do away with the redundant LSI_CONFIG_COMPAT redefinition for 3901da177e4SLinus Torvalds CONFIG_COMPAT. Replace <asm/ioctl32.h> with <linux/ioctl32.h> 3911da177e4SLinus Torvalds 3921da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 08.17.2004 3931da177e4SLinus Torvalds linux-scsi mailing list 3941da177e4SLinus Torvalds 3951da177e4SLinus Torvaldsvi. Add support for 64-bit applications. Current drivers assume only 3961da177e4SLinus Torvalds 32-bit applications, even on 64-bit platforms. Use the "data" and 3971da177e4SLinus Torvalds "buffer" fields of the mimd_t structure, instead of embedded 32-bit 3981da177e4SLinus Torvalds addresses in application mailbox and passthru structures. 3991da177e4SLinus Torvalds 4001da177e4SLinus Torvaldsvii. Move the function declarations for the management module from 4011da177e4SLinus Torvalds megaraid_mm.h to megaraid_mm.c 4021da177e4SLinus Torvalds 4031da177e4SLinus Torvalds - Andrew Morton <akpm@osdl.org>, 08.19.2004 4041da177e4SLinus Torvalds linux-scsi mailing list 4051da177e4SLinus Torvalds 4061da177e4SLinus Torvaldsviii. Change default values for MEGARAID_NEWGEN, MEGARAID_MM, and 4071da177e4SLinus Torvalds MEGARAID_MAILBOX to 'n' in Kconfig.megaraid 4081da177e4SLinus Torvalds 4091da177e4SLinus Torvalds - Andrew Morton <akpm@osdl.org>, 08.19.2004 4101da177e4SLinus Torvalds linux-scsi mailing list 4111da177e4SLinus Torvalds 4121da177e4SLinus Torvaldsix. replace udelay with msleep 4131da177e4SLinus Torvalds 4141da177e4SLinus Torvaldsx. Typos corrected in comments and whitespace adjustments, explicit 4151da177e4SLinus Torvalds grouping of expressions. 4161da177e4SLinus Torvalds 4171da177e4SLinus Torvalds 4181da177e4SLinus TorvaldsRelease Date : Fri Jul 23 15:22:07 EDT 2004 - Atul Mukker <atulm@lsil.com> 4191da177e4SLinus TorvaldsCurrent Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module) 4201da177e4SLinus TorvaldsOlder Version : 2.20.1.0 (scsi module), 2.20.0.0 (cmm module) 4211da177e4SLinus Torvalds 4221da177e4SLinus Torvaldsi. Add PCI ids for Acer ROMB 2E solution 4231da177e4SLinus Torvalds 4241da177e4SLinus Torvaldsii. Add PCI ids for I4 4251da177e4SLinus Torvalds 4261da177e4SLinus Torvaldsiii. Typo corrected for subsys id for megaraid sata 300-4x 4271da177e4SLinus Torvalds 4281da177e4SLinus Torvaldsiv. Remove yield() while mailbox handshake in synchronous commands 4291da177e4SLinus Torvalds 4301da177e4SLinus Torvalds 4311da177e4SLinus Torvalds "My other main gripe is things like this: 4321da177e4SLinus Torvalds 4331da177e4SLinus Torvalds + // wait for maximum 1 second for status to post 4341da177e4SLinus Torvalds + for (i = 0; i < 40000; i++) { 4351da177e4SLinus Torvalds + if (mbox->numstatus != 0xFF) break; 4361da177e4SLinus Torvalds + udelay(25); yield(); 4371da177e4SLinus Torvalds + } 4381da177e4SLinus Torvalds 4391da177e4SLinus Torvalds which litter the driver. Use of yield() in drivers is deprecated." 4401da177e4SLinus Torvalds 4411da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 07.14.2004 4421da177e4SLinus Torvalds linux-scsi mailing list 4431da177e4SLinus Torvalds 4441da177e4SLinus Torvaldsv. Remove redundant __megaraid_busywait_mbox routine 4451da177e4SLinus Torvalds 4461da177e4SLinus Torvaldsvi. Fix bug in the managment module, which causes a system lockup when the 4471da177e4SLinus Torvalds IO module is loaded and then unloaded, followed by executing any 4481da177e4SLinus Torvalds management utility. The current version of management module does not 4491da177e4SLinus Torvalds handle the adapter unregister properly. 4501da177e4SLinus Torvalds 4511da177e4SLinus Torvalds Specifically, it still keeps a reference to the unregistered 4521da177e4SLinus Torvalds controllers. To avoid this, the static array adapters has been 4531da177e4SLinus Torvalds replaced by a dynamic list, which gets updated every time an adapter 4541da177e4SLinus Torvalds is added or removed. 4551da177e4SLinus Torvalds 4561da177e4SLinus Torvalds Also, during unregistration of the IO module, the resources are 4571da177e4SLinus Torvalds now released in the exact reverse order of the allocation time 4581da177e4SLinus Torvalds sequence. 4591da177e4SLinus Torvalds 4601da177e4SLinus Torvalds 4611da177e4SLinus TorvaldsRelease Date : Fri Jun 25 18:58:43 EDT 2004 - Atul Mukker <atulm@lsil.com> 4621da177e4SLinus TorvaldsCurrent Version : 2.20.1.0 4631da177e4SLinus TorvaldsOlder Version : megaraid 2.20.0.1 4641da177e4SLinus Torvalds 4651da177e4SLinus Torvaldsi. Stale list pointer in adapter causes kernel panic when module 4661da177e4SLinus Torvalds megaraid_mbox is unloaded 4671da177e4SLinus Torvalds 4681da177e4SLinus Torvalds 4691da177e4SLinus TorvaldsRelease Date : Thu Jun 24 20:37:11 EDT 2004 - Atul Mukker <atulm@lsil.com> 4701da177e4SLinus TorvaldsCurrent Version : 2.20.0.1 4711da177e4SLinus TorvaldsOlder Version : megaraid 2.20.0.00 4721da177e4SLinus Torvalds 4731da177e4SLinus Torvaldsi. Modules are not 'y' by default, but depend on current definition of 4741da177e4SLinus Torvalds SCSI & PCI. 4751da177e4SLinus Torvalds 4761da177e4SLinus Torvaldsii. Redundant structure mraid_driver_t removed. 4771da177e4SLinus Torvalds 4781da177e4SLinus Torvaldsiii. Miscellaneous indentation and goto/label fixes. 4791da177e4SLinus Torvalds - Christoph Hellwig <hch@infradead.org>, 06.24.2004 linux-scsi 4801da177e4SLinus Torvalds 4811da177e4SLinus Torvaldsiv. scsi_host_put(), do just before completing HBA shutdown. 4821da177e4SLinus Torvalds 4831da177e4SLinus Torvalds 4841da177e4SLinus Torvalds 4851da177e4SLinus TorvaldsRelease Date : Mon Jun 21 19:53:54 EDT 2004 - Atul Mukker <atulm@lsil.com> 4861da177e4SLinus TorvaldsCurrent Version : 2.20.0.0 4871da177e4SLinus TorvaldsOlder Version : megaraid 2.20.0.rc2 and 2.00.3 4881da177e4SLinus Torvalds 4891da177e4SLinus Torvaldsi. Independent module to interact with userland applications and 4901da177e4SLinus Torvalds multiplex command to low level RAID module(s). 4911da177e4SLinus Torvalds 4921da177e4SLinus Torvalds "Shared code in a third module, a "library module", is an acceptable 4931da177e4SLinus Torvalds solution. modprobe automatically loads dependent modules, so users 4941da177e4SLinus Torvalds running "modprobe driver1" or "modprobe driver2" would automatically 4951da177e4SLinus Torvalds load the shared library module." 4961da177e4SLinus Torvalds 4971da177e4SLinus Torvalds - Jeff Garzik <jgarzik@pobox.com> 02.25.2004 LKML 4981da177e4SLinus Torvalds 4991da177e4SLinus Torvalds "As Jeff hinted, if your userspace<->driver API is consistent between 5001da177e4SLinus Torvalds your new MPT-based RAID controllers and your existing megaraid driver, 5011da177e4SLinus Torvalds then perhaps you need a single small helper module (lsiioctl or some 5021da177e4SLinus Torvalds better name), loaded by both mptraid and megaraid automatically, which 5031da177e4SLinus Torvalds handles registering the /dev/megaraid node dynamically. In this case, 5041da177e4SLinus Torvalds both mptraid and megaraid would register with lsiioctl for each 5051da177e4SLinus Torvalds adapter discovered, and lsiioctl would essentially be a switch, 5061da177e4SLinus Torvalds redirecting userspace tool ioctls to the appropriate driver." 5071da177e4SLinus Torvalds 5081da177e4SLinus Torvalds - Matt Domsch <Matt_Domsch@dell.com> 02.25.2004 LKML 5091da177e4SLinus Torvalds 5101da177e4SLinus Torvaldsii. Remove C99 initializations from pci_device id. 5111da177e4SLinus Torvalds 5121da177e4SLinus Torvalds "pci_id_table_g would be much more readable when not using C99 5131da177e4SLinus Torvalds initializers. 5141da177e4SLinus Torvalds PCI table doesn't change, there's lots of users that prefer the more 5151da177e4SLinus Torvalds readable variant. And it's really far less and much easier to grok 5161da177e4SLinus Torvalds lines without C99 initializers." 5171da177e4SLinus Torvalds 5181da177e4SLinus Torvalds - Christoph Hellwig <hch@infradead.org>, 05.28.2004 linux-scsi 5191da177e4SLinus Torvalds 5201da177e4SLinus Torvaldsiii. Many fixes as suggested by Christoph Hellwig <hch@infradead.org> on 5211da177e4SLinus Torvalds linux-scsi, 05.28.2004 5221da177e4SLinus Torvalds 5231da177e4SLinus Torvaldsiv. We now support up to 32 parallel ioctl commands instead of current 1. 5241da177e4SLinus Torvalds There is a conscious effort to let memory allocation not fail for ioctl 5251da177e4SLinus Torvalds commands. 5261da177e4SLinus Torvalds 5271da177e4SLinus Torvaldsv. Do away with internal memory management. Use pci_pool_(create|alloc) 5281da177e4SLinus Torvalds instead. 5291da177e4SLinus Torvalds 5301da177e4SLinus Torvaldsvi. Kill tasklet when unloading the driver. 5311da177e4SLinus Torvalds 5321da177e4SLinus Torvaldsvii. Do not use "host_lock', driver has fine-grain locks now to protect all 5331da177e4SLinus Torvalds data structures. 5341da177e4SLinus Torvalds 5351da177e4SLinus Torvaldsviii. Optimize the build scatter-gather list routine. The callers already 5361da177e4SLinus Torvalds know the data transfer address and length. 5371da177e4SLinus Torvalds 5381da177e4SLinus Torvaldsix. Better implementation of error handling and recovery. Driver now 5391da177e4SLinus Torvalds performs extended errors recovery for instances like scsi cable pull. 5401da177e4SLinus Torvalds 5411da177e4SLinus Torvaldsx. Disassociate the management commands with an overlaid scsi command. 5421da177e4SLinus Torvalds Driver now treats the management packets as special packets and has a 5431da177e4SLinus Torvalds dedicated callback routine. 544