1cd96d96fSSumant PatroRelease Date : Thu Nov 16 15:32:35 EST 2006 - 2cd96d96fSSumant Patro Sumant Patro <sumant.patro@lsi.com> 3cd96d96fSSumant PatroCurrent Version : 2.20.5.1 (scsi module), 2.20.2.6 (cmm module) 4cd96d96fSSumant PatroOlder Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module) 5cd96d96fSSumant Patro 6cd96d96fSSumant Patro1. Changes in Initialization to fix kdump failure. 7cd96d96fSSumant Patro Send SYNC command on loading. 8cd96d96fSSumant Patro This command clears the pending commands in the adapter 9cd96d96fSSumant Patro and re-initialize its internal RAID structure. 10cd96d96fSSumant Patro Without this change, megaraid driver either panics or fails to 11cd96d96fSSumant Patro initialize the adapter during kdump's second kernel boot 12cd96d96fSSumant Patro if there are pending commands or interrupts from other devices 13cd96d96fSSumant Patro sharing the same IRQ. 14cd96d96fSSumant Patro2. Authors email-id domain name changed from lsil.com to lsi.com. 15cd96d96fSSumant Patro Also modified the MODULE_AUTHOR to megaraidlinux@lsi.com 16cd96d96fSSumant Patro 17fbf60802SJu, SeokmannRelease Date : Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@lsil.com> 18fbf60802SJu, SeokmannCurrent Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module) 19fbf60802SJu, SeokmannOlder Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) 20fbf60802SJu, Seokmann 21fbf60802SJu, Seokmann1. Fixed a bug in megaraid_init_mbox(). 22fbf60802SJu, Seokmann Customer reported "garbage in file on x86_64 platform". 23fbf60802SJu, Seokmann Root Cause: the driver registered controllers as 64-bit DMA capable 24fbf60802SJu, Seokmann for those which are not support it. 25*685d5ef4SRandy Dunlap Fix: Made change in the function inserting identification mechanism 26fbf60802SJu, Seokmann identifying 64-bit DMA capable controllers. 27fbf60802SJu, Seokmann 28fbf60802SJu, Seokmann > -----Original Message----- 29fbf60802SJu, Seokmann > From: Vasily Averin [mailto:vvs@sw.ru] 30fbf60802SJu, Seokmann > Sent: Thursday, May 04, 2006 2:49 PM 31fbf60802SJu, Seokmann > To: linux-scsi@vger.kernel.org; Kolli, Neela; Mukker, Atul; 32fbf60802SJu, Seokmann > Ju, Seokmann; Bagalkote, Sreenivas; 33fbf60802SJu, Seokmann > James.Bottomley@SteelEye.com; devel@openvz.org 34fbf60802SJu, Seokmann > Subject: megaraid_mbox: garbage in file 35fbf60802SJu, Seokmann > 36fbf60802SJu, Seokmann > Hello all, 37fbf60802SJu, Seokmann > 38fbf60802SJu, Seokmann > I've investigated customers claim on the unstable work of 39fbf60802SJu, Seokmann > their node and found a 40fbf60802SJu, Seokmann > strange effect: reading from some files leads to the 41fbf60802SJu, Seokmann > "attempt to access beyond end of device" messages. 42fbf60802SJu, Seokmann > 43fbf60802SJu, Seokmann > I've checked filesystem, memory on the node, motherboard BIOS 44fbf60802SJu, Seokmann > version, but it 45fbf60802SJu, Seokmann > does not help and issue still has been reproduced by simple 46fbf60802SJu, Seokmann > file reading. 47fbf60802SJu, Seokmann > 48fbf60802SJu, Seokmann > Reproducer is simple: 49fbf60802SJu, Seokmann > 50fbf60802SJu, Seokmann > echo 0xffffffff >/proc/sys/dev/scsi/logging_level ; 51fbf60802SJu, Seokmann > cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt ; 52fbf60802SJu, Seokmann > echo 0 >/proc/sys/dev/scsi/logging 53fbf60802SJu, Seokmann > 54fbf60802SJu, Seokmann > It leads to the following messages in dmesg 55fbf60802SJu, Seokmann > 56fbf60802SJu, Seokmann > sd_init_command: disk=sda, block=871769260, count=26 57fbf60802SJu, Seokmann > sda : block=871769260 58fbf60802SJu, Seokmann > sda : reading 26/26 512 byte blocks. 59fbf60802SJu, Seokmann > scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420) 60fbf60802SJu, Seokmann > sd 0:1:0:0: send 0xf79ed980 sd 0:1:0:0: 61fbf60802SJu, Seokmann > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 62fbf60802SJu, Seokmann > buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40, 63fbf60802SJu, Seokmann > queuecommand 0xc0344010 64fbf60802SJu, Seokmann > leaving scsi_dispatch_cmnd() 65fbf60802SJu, Seokmann > scsi_delete_timer: scmd: f79ed980, rtn: 1 66fbf60802SJu, Seokmann > sd 0:1:0:0: done 0xf79ed980 SUCCESS 0 sd 0:1:0:0: 67fbf60802SJu, Seokmann > command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00 68fbf60802SJu, Seokmann > scsi host busy 1 failed 0 69fbf60802SJu, Seokmann > sd 0:1:0:0: Notifying upper driver of completion (result 0) 70fbf60802SJu, Seokmann > sd_rw_intr: sda: res=0x0 71fbf60802SJu, Seokmann > 26 sectors total, 13312 bytes done. 72fbf60802SJu, Seokmann > use_sg is 4 73fbf60802SJu, Seokmann > attempt to access beyond end of device 74fbf60802SJu, Seokmann > sda6: rw=0, want=1044134458, limit=951401367 75fbf60802SJu, Seokmann > Buffer I/O error on device sda6, logical block 522067228 76fbf60802SJu, Seokmann > attempt to access beyond end of device 77fbf60802SJu, Seokmann 78aa677bc7SJu, Seokmann2. When INQUIRY with EVPD bit set issued to the MegaRAID controller, 79aa677bc7SJu, Seokmann system memory gets corrupted. 80aa677bc7SJu, Seokmann Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set 81aa677bc7SJu, Seokmann incorrectly. 82aa677bc7SJu, Seokmann Fix: MegaRAID F/W has fixed the problem and being process of release, 83aa677bc7SJu, Seokmann soon. Meanwhile, driver will filter out the request. 84aa677bc7SJu, Seokmann 85*685d5ef4SRandy Dunlap3. One member in the data structure of the driver leads to unaligned 860b4972d5SJu, Seokmann issue on 64-bit platform. 87*685d5ef4SRandy Dunlap Customer reported "kernel unaligned access address" issue when 880b4972d5SJu, Seokmann application communicates with MegaRAID HBA driver. 890b4972d5SJu, Seokmann Root Cause: in uioc_t structure, one of member had misaligned and it 900b4972d5SJu, Seokmann led system to display the error message. 910b4972d5SJu, Seokmann Fix: A patch submitted to community from following folk. 920b4972d5SJu, Seokmann 930b4972d5SJu, Seokmann > -----Original Message----- 940b4972d5SJu, Seokmann > From: linux-scsi-owner@vger.kernel.org 950b4972d5SJu, Seokmann > [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sakurai Hiroomi 960b4972d5SJu, Seokmann > Sent: Wednesday, July 12, 2006 4:20 AM 970b4972d5SJu, Seokmann > To: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org 980b4972d5SJu, Seokmann > Subject: Re: Help: strange messages from kernel on IA64 platform 990b4972d5SJu, Seokmann > 1000b4972d5SJu, Seokmann > Hi, 1010b4972d5SJu, Seokmann > 1020b4972d5SJu, Seokmann > I saw same message. 1030b4972d5SJu, Seokmann > 1040b4972d5SJu, Seokmann > When GAM(Global Array Manager) is started, The following 1050b4972d5SJu, Seokmann > message output. 1060b4972d5SJu, Seokmann > kernel: kernel unaligned access to 0xe0000001fe1080d4, 1070b4972d5SJu, Seokmann > ip=0xa000000200053371 1080b4972d5SJu, Seokmann > 1090b4972d5SJu, Seokmann > The uioc structure used by ioctl is defined by packed, 1100b4972d5SJu, Seokmann > the allignment of each member are disturbed. 1110b4972d5SJu, Seokmann > In a 64 bit structure, the allignment of member doesn't fit 64 bit 1120b4972d5SJu, Seokmann > boundary. this causes this messages. 1130b4972d5SJu, Seokmann > In a 32 bit structure, we don't see the message because the allinment 1140b4972d5SJu, Seokmann > of member fit 32 bit boundary even if packed is specified. 1150b4972d5SJu, Seokmann > 1160b4972d5SJu, Seokmann > patch 1170b4972d5SJu, Seokmann > I Add 32 bit dummy member to fit 64 bit boundary. I tested. 1180b4972d5SJu, Seokmann > We confirmed this patch fix the problem by IA64 server. 1190b4972d5SJu, Seokmann > 1200b4972d5SJu, Seokmann > ************************************************************** 1210b4972d5SJu, Seokmann > **************** 1220b4972d5SJu, Seokmann > --- linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h.orig 1230b4972d5SJu, Seokmann > 2006-04-03 17:13:03.000000000 +0900 1240b4972d5SJu, Seokmann > +++ linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h 1250b4972d5SJu, Seokmann > 2006-04-03 17:14:09.000000000 +0900 1260b4972d5SJu, Seokmann > @@ -132,6 +132,10 @@ 1270b4972d5SJu, Seokmann > /* Driver Data: */ 1280b4972d5SJu, Seokmann > void __user * user_data; 1290b4972d5SJu, Seokmann > uint32_t user_data_len; 1300b4972d5SJu, Seokmann > + 1310b4972d5SJu, Seokmann > + /* 64bit alignment */ 1320b4972d5SJu, Seokmann > + uint32_t pad_0xBC; 1330b4972d5SJu, Seokmann > + 1340b4972d5SJu, Seokmann > mraid_passthru_t __user *user_pthru; 1350b4972d5SJu, Seokmann > 1360b4972d5SJu, Seokmann > mraid_passthru_t *pthru32; 1370b4972d5SJu, Seokmann > ************************************************************** 1380b4972d5SJu, Seokmann > **************** 1390b4972d5SJu, Seokmann 140c005fb4fSJu, SeokmannRelease Date : Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com> 141c005fb4fSJu, SeokmannCurrent Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module) 142c005fb4fSJu, SeokmannOlder Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) 143c005fb4fSJu, Seokmann 144c005fb4fSJu, Seokmann1. Fixed a bug in megaraid_reset_handler(). 145c005fb4fSJu, Seokmann Customer reported "Unable to handle kernel NULL pointer dereference 146c005fb4fSJu, Seokmann at virtual address 00000000" when system goes to reset condition 147c005fb4fSJu, Seokmann for some reason. It happened randomly. 148c005fb4fSJu, Seokmann Root Cause: in the megaraid_reset_handler(), there is possibility not 149c005fb4fSJu, Seokmann returning pending packets in the pend_list if there are multiple 150c005fb4fSJu, Seokmann pending packets. 151c005fb4fSJu, Seokmann Fix: Made the change in the driver so that it will return all packets 152c005fb4fSJu, Seokmann in the pend_list. 153c005fb4fSJu, Seokmann 154c005fb4fSJu, Seokmann2. Added change request. 155c005fb4fSJu, Seokmann As found in the following URL, rmb() only didn't help the 156c005fb4fSJu, Seokmann problem. I had to increase the loop counter to 0xFFFFFF. (6 F's) 157c005fb4fSJu, Seokmann http://marc.theaimsgroup.com/?l=linux-scsi&m=110971060502497&w=2 158c005fb4fSJu, Seokmann 159c005fb4fSJu, Seokmann I attached a patch for your reference, too. 160c005fb4fSJu, Seokmann Could you check and get this fix in your driver? 161c005fb4fSJu, Seokmann 162c005fb4fSJu, Seokmann Best Regards, 163c005fb4fSJu, Seokmann Jun'ichi Nomura 164c005fb4fSJu, Seokmann 165ed7e8ef7SJu, SeokmannRelease Date : Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> 166ed7e8ef7SJu, SeokmannCurrent Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module) 167ed7e8ef7SJu, SeokmannOlder Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) 168ed7e8ef7SJu, Seokmann 169ed7e8ef7SJu, Seokmann1. Sorted out PCI IDs to remove megaraid support overlaps. 170ed7e8ef7SJu, Seokmann Based on the patch from Daniel, sorted out PCI IDs along with 17125985edcSLucas De Marchi character node name change from 'megadev' to 'megadev_legacy' to avoid 172ed7e8ef7SJu, Seokmann conflict. 173ed7e8ef7SJu, Seokmann --- 174ed7e8ef7SJu, Seokmann Hopefully we'll be getting the build restriction zapped much sooner, 175ed7e8ef7SJu, Seokmann but we should also be thinking about totally removing the hardware 176ed7e8ef7SJu, Seokmann support overlap in the megaraid drivers. 177ed7e8ef7SJu, Seokmann 178ed7e8ef7SJu, Seokmann This patch pencils in a date of Feb 06 for this, and performs some 179ed7e8ef7SJu, Seokmann printk abuse in hope that existing legacy users might pick up on what's 180ed7e8ef7SJu, Seokmann going on. 181ed7e8ef7SJu, Seokmann 182ed7e8ef7SJu, Seokmann Signed-off-by: Daniel Drake <dsd@gentoo.org> 183ed7e8ef7SJu, Seokmann --- 184ed7e8ef7SJu, Seokmann 185ed7e8ef7SJu, Seokmann2. Fixed a issue: megaraid always fails to reset handler. 186ed7e8ef7SJu, Seokmann --- 187ed7e8ef7SJu, Seokmann I found that the megaraid driver always fails to reset the 188ed7e8ef7SJu, Seokmann adapter with the following message: 189ed7e8ef7SJu, Seokmann megaraid: resetting the host... 190ed7e8ef7SJu, Seokmann megaraid mbox: reset sequence completed successfully 191ed7e8ef7SJu, Seokmann megaraid: fast sync command timed out 192ed7e8ef7SJu, Seokmann megaraid: reservation reset failed 193ed7e8ef7SJu, Seokmann when the "Cluster mode" of the adapter BIOS is enabled. 194ed7e8ef7SJu, Seokmann So, whenever the reset occurs, the adapter goes to 195ed7e8ef7SJu, Seokmann offline and just become unavailable. 196ed7e8ef7SJu, Seokmann 197ed7e8ef7SJu, Seokmann Jun'ichi Nomura [mailto:jnomura@mtc.biglobe.ne.jp] 198ed7e8ef7SJu, Seokmann --- 199ed7e8ef7SJu, Seokmann 200672b2d38SJu, Seokmann Release Date : Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> 201672b2d38SJu, Seokmann Current Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module) 202672b2d38SJu, Seokmann Older Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) 203672b2d38SJu, Seokmann 204672b2d38SJu, Seokmann 1. Added IOCTL backward compatibility. 205672b2d38SJu, Seokmann Convert megaraid_mm driver to new compat_ioctl entry points. 206672b2d38SJu, Seokmann I don't have easy access to hardware, so only compile tested. 207672b2d38SJu, Seokmann - Signed-off-by:Andi Kleen <ak@muc.de> 208672b2d38SJu, Seokmann 209672b2d38SJu, Seokmann 2. megaraid_mbox fix: wrong order of arguments in memset() 210672b2d38SJu, Seokmann That, BTW, shows why cross-builds are useful-the only indication of 211672b2d38SJu, Seokmann problem had been a new warning showing up in sparse output on alpha 212672b2d38SJu, Seokmann build (number of exceeding 256 got truncated). 213672b2d38SJu, Seokmann - Signed-off-by: Al Viro 214672b2d38SJu, Seokmann <viro@parcelfarce.linux.theplanet.co.uk> 215672b2d38SJu, Seokmann 216672b2d38SJu, Seokmann 3. Convert pci_module_init to pci_register_driver 217672b2d38SJu, Seokmann Convert from pci_module_init to pci_register_driver 2180ea6e611SJustin P. Mattock (from:http://kernelnewbies.org/KernelJanitors/TODO) 219672b2d38SJu, Seokmann - Signed-off-by: Domen Puncer <domen@coderock.org> 220672b2d38SJu, Seokmann 221672b2d38SJu, Seokmann 4. Use the pre defined DMA mask constants from dma-mapping.h 222672b2d38SJu, Seokmann Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling 223ee4b4c9fSDan Carpenter pci_set_dma_mask() or pci_set_consistent_dma_mask(). See 224672b2d38SJu, Seokmann http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for more 225672b2d38SJu, Seokmann details. 226672b2d38SJu, Seokmann Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> 227672b2d38SJu, Seokmann Signed-off-by: Domen Puncer <domen@coderock.org> 228672b2d38SJu, Seokmann 229672b2d38SJu, Seokmann 5. Remove SSID checking for Dobson, Lindsay, and Verde based products. 230672b2d38SJu, Seokmann Checking the SSVID/SSID for controllers which have Dobson, Lindsay, 231672b2d38SJu, Seokmann and Verde is unnecessary because device ID has been assigned by LSI 232672b2d38SJu, Seokmann and it is unique value. So, all controllers with these IOPs have to be 233672b2d38SJu, Seokmann supported by the driver regardless SSVID/SSID. 234672b2d38SJu, Seokmann 235672b2d38SJu, Seokmann 6. Date Thu, 27 Jan 2005 04:31:09 +0100 236672b2d38SJu, Seokmann From Herbert Poetzl <> 237672b2d38SJu, Seokmann Subject RFC: assert_spin_locked() for 2.6 238672b2d38SJu, Seokmann 239672b2d38SJu, Seokmann Greetings! 240672b2d38SJu, Seokmann 241672b2d38SJu, Seokmann overcautious programming will kill your kernel ;) 242672b2d38SJu, Seokmann ever thought about checking a spin_lock or even 243672b2d38SJu, Seokmann asserting that it must be held (maybe just for 244672b2d38SJu, Seokmann spinlock debugging?) ... 245672b2d38SJu, Seokmann 246672b2d38SJu, Seokmann there are several checks present in the kernel 247672b2d38SJu, Seokmann where somebody does a variation on the following: 248672b2d38SJu, Seokmann 249672b2d38SJu, Seokmann BUG_ON(!spin_is_locked(&some_lock)); 250672b2d38SJu, Seokmann 251672b2d38SJu, Seokmann so what's wrong about that? nothing, unless you 252672b2d38SJu, Seokmann compile the code with CONFIG_DEBUG_SPINLOCK but 253672b2d38SJu, Seokmann without CONFIG_SMP ... in which case the BUG() 254672b2d38SJu, Seokmann will kill your kernel ... 255672b2d38SJu, Seokmann 256672b2d38SJu, Seokmann maybe it's not advised to make such assertions, 257672b2d38SJu, Seokmann but here is a solution which works for me ... 258672b2d38SJu, Seokmann (compile tested for sh, x86_64 and x86, boot/run 259672b2d38SJu, Seokmann tested for x86 only) 260672b2d38SJu, Seokmann 261672b2d38SJu, Seokmann best, 262672b2d38SJu, Seokmann Herbert 263672b2d38SJu, Seokmann 264672b2d38SJu, Seokmann - Herbert Poetzl <herbert@13thfloor.at>, Thu, 27 Jan 2005 265672b2d38SJu, Seokmann 2661da177e4SLinus TorvaldsRelease Date : Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com> 2671da177e4SLinus TorvaldsCurrent Version : 2.20.4.5 (scsi module), 2.20.2.5 (cmm module) 2681da177e4SLinus TorvaldsOlder Version : 2.20.4.4 (scsi module), 2.20.2.4 (cmm module) 2691da177e4SLinus Torvalds 2701da177e4SLinus Torvalds1. Modified name of two attributes in scsi_host_template. 2711da177e4SLinus Torvalds On Wed, 2005-02-02 at 10:56 -0500, Ju, Seokmann wrote: 2721da177e4SLinus Torvalds > + .sdev_attrs = megaraid_device_attrs, 2731da177e4SLinus Torvalds > + .shost_attrs = megaraid_class_device_attrs, 2741da177e4SLinus Torvalds 2751da177e4SLinus Torvalds These are, perhaps, slightly confusing names. 2761da177e4SLinus Torvalds The terms device and class_device have well defined meanings in the 2771da177e4SLinus Torvalds generic device model, neither of which is what you mean here. 2781da177e4SLinus Torvalds Why not simply megaraid_sdev_attrs and megaraid_shost_attrs? 2791da177e4SLinus Torvalds 2801da177e4SLinus Torvalds Other than this, it looks fine to me too. 2811da177e4SLinus Torvalds 2821da177e4SLinus TorvaldsRelease Date : Thu Jan 27 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com> 2831da177e4SLinus TorvaldsCurrent Version : 2.20.4.4 (scsi module), 2.20.2.5 (cmm module) 2841da177e4SLinus TorvaldsOlder Version : 2.20.4.3 (scsi module), 2.20.2.4 (cmm module) 2851da177e4SLinus Torvalds 2861da177e4SLinus Torvalds1. Bump up the version of scsi module due to its conflict. 2871da177e4SLinus Torvalds 2881da177e4SLinus TorvaldsRelease Date : Thu Jan 21 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com> 2891da177e4SLinus TorvaldsCurrent Version : 2.20.4.3 (scsi module), 2.20.2.5 (cmm module) 2901da177e4SLinus TorvaldsOlder Version : 2.20.4.2 (scsi module), 2.20.2.4 (cmm module) 2911da177e4SLinus Torvalds 2921da177e4SLinus Torvalds1. Remove driver ioctl for logical drive to scsi address translation and 2931da177e4SLinus Torvalds replace with the sysfs attribute. To remove drives and change 2941da177e4SLinus Torvalds capacity, application shall now use the device attribute to get the 2951da177e4SLinus Torvalds logical drive number for a scsi device. For adding newly created 2961da177e4SLinus Torvalds logical drives, class device attribute would be required to uniquely 2971da177e4SLinus Torvalds identify each controller. 2981da177e4SLinus Torvalds - Atul Mukker <atulm@lsil.com> 2991da177e4SLinus Torvalds 3001da177e4SLinus Torvalds "James, I've been thinking about this a little more, and you may be on 3011da177e4SLinus Torvalds to something here. Let each driver add files as such:" 3021da177e4SLinus Torvalds 3031da177e4SLinus Torvalds - Matt Domsch <Matt_Domsch@dell.com>, 12.15.2004 3041da177e4SLinus Torvalds linux-scsi mailing list 3051da177e4SLinus Torvalds 3061da177e4SLinus Torvalds 3071da177e4SLinus Torvalds "Then, if you simply publish your LD number as an extra parameter of 3081da177e4SLinus Torvalds the device, you can look through /sys to find it." 3091da177e4SLinus Torvalds 3101da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 01.03.2005 3111da177e4SLinus Torvalds linux-scsi mailing list 3121da177e4SLinus Torvalds 3131da177e4SLinus Torvalds 3141da177e4SLinus Torvalds "I don't see why not ... it's your driver, you can publish whatever 3151da177e4SLinus Torvalds extra information you need as scsi_device attributes; that was one of 3161da177e4SLinus Torvalds the designs of the extensible attribute system." 3171da177e4SLinus Torvalds 3181da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 01.06.2005 3191da177e4SLinus Torvalds linux-scsi mailing list 3201da177e4SLinus Torvalds 3211da177e4SLinus Torvalds2. Add AMI megaraid support - Brian King <brking@charter.net> 3221da177e4SLinus Torvalds PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3, 3231da177e4SLinus Torvalds PCI_VENDOR_ID_AMI, PCI_SUBSYS_ID_PERC3_DC, 3241da177e4SLinus Torvalds 3251da177e4SLinus Torvalds3. Make some code static - Adrian Bunk <bunk@stusta.de> 3261da177e4SLinus Torvalds Date: Mon, 15 Nov 2004 03:14:57 +0100 3271da177e4SLinus Torvalds 3281da177e4SLinus Torvalds The patch below makes some needlessly global code static. 3291da177e4SLinus Torvalds -wait_queue_head_t wait_q; 3301da177e4SLinus Torvalds +static wait_queue_head_t wait_q; 3311da177e4SLinus Torvalds 3321da177e4SLinus Torvalds Signed-off-by: Adrian Bunk <bunk@stusta.de> 3331da177e4SLinus Torvalds 3341da177e4SLinus Torvalds4. Added NEC ROMB support - NEC MegaRAID PCI Express ROMB controller 3351da177e4SLinus Torvalds PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E, 3361da177e4SLinus Torvalds PCI_SUBSYS_ID_NEC, PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E, 3371da177e4SLinus Torvalds 3381da177e4SLinus Torvalds5. Fixed Tape drive issue : For any Direct CDB command to physical device 3391da177e4SLinus Torvalds including tape, timeout value set by driver was 10 minutes. With this 3401da177e4SLinus Torvalds value, most of command will return within timeout. However, for those 3411da177e4SLinus Torvalds command like ERASE or FORMAT, it takes more than an hour depends on 3421da177e4SLinus Torvalds capacity of the device and the command could be terminated before it 3431da177e4SLinus Torvalds completes. 3441da177e4SLinus Torvalds To address this issue, the 'timeout' field in the DCDB command will 3451da177e4SLinus Torvalds have NO TIMEOUT (i.e., 4) value as its timeout on DCDB command. 3461da177e4SLinus Torvalds 3471da177e4SLinus Torvalds 3481da177e4SLinus Torvalds 3491da177e4SLinus TorvaldsRelease Date : Thu Dec 9 19:10:23 EST 2004 3501da177e4SLinus Torvalds - Sreenivas Bagalkote <sreenib@lsil.com> 3511da177e4SLinus Torvalds 3521da177e4SLinus TorvaldsCurrent Version : 2.20.4.2 (scsi module), 2.20.2.4 (cmm module) 3531da177e4SLinus TorvaldsOlder Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module) 3541da177e4SLinus Torvalds 3551da177e4SLinus Torvaldsi. Introduced driver ioctl that returns scsi address for a given ld. 3561da177e4SLinus Torvalds 3571da177e4SLinus Torvalds "Why can't the existing sysfs interfaces be used to do this?" 3581da177e4SLinus Torvalds - Brian King (brking@us.ibm.com) 3591da177e4SLinus Torvalds 3601da177e4SLinus Torvalds "I've looked into solving this another way, but I cannot see how 3611da177e4SLinus Torvalds to get this driver-private mapping of logical drive number-> HCTL 3621da177e4SLinus Torvalds without putting code something like this into the driver." 3631da177e4SLinus Torvalds 3641da177e4SLinus Torvalds "...and by providing a mapping a function to userspace, the driver 3651da177e4SLinus Torvalds is free to change its mapping algorithm in the future if necessary .." 3661da177e4SLinus Torvalds - Matt Domsch (Matt_Domsch@dell.com) 3671da177e4SLinus Torvalds 3681da177e4SLinus TorvaldsRelease Date : Thu Dec 9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com> 3691da177e4SLinus Torvalds 3701da177e4SLinus TorvaldsCurrent Version : 2.20.4.1 (scsi module), 2.20.2.3 (cmm module) 3711da177e4SLinus TorvaldsOlder Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module) 3721da177e4SLinus Torvalds 3731da177e4SLinus Torvaldsi. Fix a bug in kioc's dma buffer deallocation 3741da177e4SLinus Torvalds 3751da177e4SLinus TorvaldsRelease Date : Thu Nov 4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com> 3761da177e4SLinus Torvalds 3771da177e4SLinus TorvaldsCurrent Version : 2.20.4.1 (scsi module), 2.20.2.2 (cmm module) 3781da177e4SLinus TorvaldsOlder Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module) 3791da177e4SLinus Torvalds 3801da177e4SLinus Torvaldsi. Handle IOCTL cmd timeouts more properly. 3811da177e4SLinus Torvalds 3821da177e4SLinus Torvaldsii. pci_dma_sync_{sg,single}_for_cpu was introduced into megaraid_mbox 3831da177e4SLinus Torvalds incorrectly (instead of _for_device). Changed to appropriate 3841da177e4SLinus Torvalds pci_dma_sync_{sg,single}_for_device. 3851da177e4SLinus Torvalds 3861da177e4SLinus TorvaldsRelease Date : Wed Oct 06 11:15:29 EDT 2004 - Sreenivas Bagalkote <sreenib@lsil.com> 3871da177e4SLinus TorvaldsCurrent Version : 2.20.4.0 (scsi module), 2.20.2.1 (cmm module) 3881da177e4SLinus TorvaldsOlder Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module) 3891da177e4SLinus Torvalds 3901da177e4SLinus Torvaldsi. Remove CONFIG_COMPAT around register_ioctl32_conversion 3911da177e4SLinus Torvalds 3921da177e4SLinus TorvaldsRelease Date : Mon Sep 27 22:15:07 EDT 2004 - Atul Mukker <atulm@lsil.com> 3931da177e4SLinus TorvaldsCurrent Version : 2.20.4.0 (scsi module), 2.20.2.0 (cmm module) 3941da177e4SLinus TorvaldsOlder Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module) 3951da177e4SLinus Torvalds 3961da177e4SLinus Torvaldsi. Fix data corruption. Because of a typo in the driver, the IO packets 3971da177e4SLinus Torvalds were wrongly shared by the ioctl path. This causes a whole IO command 3981da177e4SLinus Torvalds to be replaced by an incoming ioctl command. 3991da177e4SLinus Torvalds 4001da177e4SLinus TorvaldsRelease Date : Tue Aug 24 09:43:35 EDT 2004 - Atul Mukker <atulm@lsil.com> 4011da177e4SLinus TorvaldsCurrent Version : 2.20.3.1 (scsi module), 2.20.2.0 (cmm module) 4021da177e4SLinus TorvaldsOlder Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module) 4031da177e4SLinus Torvalds 4041da177e4SLinus Torvaldsi. Function reordering so that inline functions are defined before they 4051da177e4SLinus Torvalds are actually used. It is now mandatory for GCC 3.4.1 (current stable) 4061da177e4SLinus Torvalds 4071da177e4SLinus Torvalds Declare some heavy-weight functions to be non-inlined, 4081da177e4SLinus Torvalds megaraid_mbox_build_cmd, megaraid_mbox_runpendq, 4091da177e4SLinus Torvalds megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru, 4101da177e4SLinus Torvalds megaraid_busywait_mbox 4111da177e4SLinus Torvalds 412e1f8e874SFrancois Cami - Andrew Morton, 08.19.2004 4131da177e4SLinus Torvalds linux-scsi mailing list 4141da177e4SLinus Torvalds 4151da177e4SLinus Torvalds "Something else to clean up after inclusion: every instance of an 4161da177e4SLinus Torvalds inline function is actually rendered as a full function call, because 4171da177e4SLinus Torvalds the function is always used before it is defined. Atul, please 4181da177e4SLinus Torvalds re-arrange the code to eliminate the need for most (all) of the 4191da177e4SLinus Torvalds function prototypes at the top of each file, and define (not just 4201da177e4SLinus Torvalds declare with a prototype) each inline function before its first use" 4211da177e4SLinus Torvalds 4221da177e4SLinus Torvalds - Matt Domsch <Matt_Domsch@dell.com>, 07.27.2004 4231da177e4SLinus Torvalds linux-scsi mailing list 4241da177e4SLinus Torvalds 4251da177e4SLinus Torvalds 4261da177e4SLinus Torvaldsii. Display elapsed time (countdown) while waiting for FW to boot. 4271da177e4SLinus Torvalds 4281da177e4SLinus Torvaldsiii. Module compilation reorder in Makefile so that unresolved symbols do 4291da177e4SLinus Torvalds not occur when driver is compiled non-modular. 4301da177e4SLinus Torvalds 4311da177e4SLinus Torvalds Patrick J. LoPresti <patl@users.sourceforge.net>, 8.22.2004 4321da177e4SLinus Torvalds linux-scsi mailing list 4331da177e4SLinus Torvalds 4341da177e4SLinus Torvalds 4351da177e4SLinus TorvaldsRelease Date : Thu Aug 19 09:58:33 EDT 2004 - Atul Mukker <atulm@lsil.com> 4361da177e4SLinus TorvaldsCurrent Version : 2.20.3.0 (scsi module), 2.20.2.0 (cmm module) 4371da177e4SLinus TorvaldsOlder Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module) 4381da177e4SLinus Torvalds 4391da177e4SLinus Torvaldsi. When copying the mailbox packets, copy only first 14 bytes (for 32-bit 4401da177e4SLinus Torvalds mailboxes) and only first 22 bytes (for 64-bit mailboxes). This is to 4411da177e4SLinus Torvalds avoid getting the stale values for busy bit. We want to set the busy 4421da177e4SLinus Torvalds bit just before issuing command to the FW. 4431da177e4SLinus Torvalds 444*685d5ef4SRandy Dunlapii. In the reset handling, if the reset command is not owned by the 4451da177e4SLinus Torvalds driver, do not (wrongly) print information for the "attached" driver 4461da177e4SLinus Torvalds packet. 4471da177e4SLinus Torvalds 4481da177e4SLinus Torvaldsiii. Have extended wait when issuing command in synchronous mode. This is 4491da177e4SLinus Torvalds required for the cases where the option ROM is disabled and there is 4501da177e4SLinus Torvalds no BIOS to start the controller. The FW starts to boot after receiving 4511da177e4SLinus Torvalds the first command from the driver. The current driver has 1 second 4521da177e4SLinus Torvalds timeout for the synchronous commands, which is far less than what is 4531da177e4SLinus Torvalds actually required. We now wait up to MBOX_RESET_TIME (180 seconds) for 4541da177e4SLinus Torvalds FW boot process. 4551da177e4SLinus Torvalds 4561da177e4SLinus Torvaldsiv. In megaraid_mbox_product_info, clear the mailbox contents completely 4571da177e4SLinus Torvalds before preparing the command for inquiry3. This is to ensure that the 4581da177e4SLinus Torvalds FW does not get junk values in the command. 4591da177e4SLinus Torvalds 4601da177e4SLinus Torvaldsv. Do away with the redundant LSI_CONFIG_COMPAT redefinition for 4611da177e4SLinus Torvalds CONFIG_COMPAT. Replace <asm/ioctl32.h> with <linux/ioctl32.h> 4621da177e4SLinus Torvalds 4631da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 08.17.2004 4641da177e4SLinus Torvalds linux-scsi mailing list 4651da177e4SLinus Torvalds 4661da177e4SLinus Torvaldsvi. Add support for 64-bit applications. Current drivers assume only 4671da177e4SLinus Torvalds 32-bit applications, even on 64-bit platforms. Use the "data" and 4681da177e4SLinus Torvalds "buffer" fields of the mimd_t structure, instead of embedded 32-bit 4691da177e4SLinus Torvalds addresses in application mailbox and passthru structures. 4701da177e4SLinus Torvalds 4711da177e4SLinus Torvaldsvii. Move the function declarations for the management module from 4721da177e4SLinus Torvalds megaraid_mm.h to megaraid_mm.c 4731da177e4SLinus Torvalds 474e1f8e874SFrancois Cami - Andrew Morton, 08.19.2004 4751da177e4SLinus Torvalds linux-scsi mailing list 4761da177e4SLinus Torvalds 4771da177e4SLinus Torvaldsviii. Change default values for MEGARAID_NEWGEN, MEGARAID_MM, and 4781da177e4SLinus Torvalds MEGARAID_MAILBOX to 'n' in Kconfig.megaraid 4791da177e4SLinus Torvalds 480e1f8e874SFrancois Cami - Andrew Morton, 08.19.2004 4811da177e4SLinus Torvalds linux-scsi mailing list 4821da177e4SLinus Torvalds 4831da177e4SLinus Torvaldsix. replace udelay with msleep 4841da177e4SLinus Torvalds 4851da177e4SLinus Torvaldsx. Typos corrected in comments and whitespace adjustments, explicit 4861da177e4SLinus Torvalds grouping of expressions. 4871da177e4SLinus Torvalds 4881da177e4SLinus Torvalds 4891da177e4SLinus TorvaldsRelease Date : Fri Jul 23 15:22:07 EDT 2004 - Atul Mukker <atulm@lsil.com> 4901da177e4SLinus TorvaldsCurrent Version : 2.20.2.0 (scsi module), 2.20.1.0 (cmm module) 4911da177e4SLinus TorvaldsOlder Version : 2.20.1.0 (scsi module), 2.20.0.0 (cmm module) 4921da177e4SLinus Torvalds 4931da177e4SLinus Torvaldsi. Add PCI ids for Acer ROMB 2E solution 4941da177e4SLinus Torvalds 4951da177e4SLinus Torvaldsii. Add PCI ids for I4 4961da177e4SLinus Torvalds 4971da177e4SLinus Torvaldsiii. Typo corrected for subsys id for megaraid sata 300-4x 4981da177e4SLinus Torvalds 4991da177e4SLinus Torvaldsiv. Remove yield() while mailbox handshake in synchronous commands 5001da177e4SLinus Torvalds 5011da177e4SLinus Torvalds 5021da177e4SLinus Torvalds "My other main gripe is things like this: 5031da177e4SLinus Torvalds 5041da177e4SLinus Torvalds + // wait for maximum 1 second for status to post 5051da177e4SLinus Torvalds + for (i = 0; i < 40000; i++) { 5061da177e4SLinus Torvalds + if (mbox->numstatus != 0xFF) break; 5071da177e4SLinus Torvalds + udelay(25); yield(); 5081da177e4SLinus Torvalds + } 5091da177e4SLinus Torvalds 5101da177e4SLinus Torvalds which litter the driver. Use of yield() in drivers is deprecated." 5111da177e4SLinus Torvalds 5121da177e4SLinus Torvalds - James Bottomley <James.Bottomley@SteelEye.com>, 07.14.2004 5131da177e4SLinus Torvalds linux-scsi mailing list 5141da177e4SLinus Torvalds 5151da177e4SLinus Torvaldsv. Remove redundant __megaraid_busywait_mbox routine 5161da177e4SLinus Torvalds 5173dbda77eSUwe Kleine-Koenigvi. Fix bug in the management module, which causes a system lockup when the 5181da177e4SLinus Torvalds IO module is loaded and then unloaded, followed by executing any 5191da177e4SLinus Torvalds management utility. The current version of management module does not 5201da177e4SLinus Torvalds handle the adapter unregister properly. 5211da177e4SLinus Torvalds 5221da177e4SLinus Torvalds Specifically, it still keeps a reference to the unregistered 5231da177e4SLinus Torvalds controllers. To avoid this, the static array adapters has been 5241da177e4SLinus Torvalds replaced by a dynamic list, which gets updated every time an adapter 5251da177e4SLinus Torvalds is added or removed. 5261da177e4SLinus Torvalds 5271da177e4SLinus Torvalds Also, during unregistration of the IO module, the resources are 5281da177e4SLinus Torvalds now released in the exact reverse order of the allocation time 5291da177e4SLinus Torvalds sequence. 5301da177e4SLinus Torvalds 5311da177e4SLinus Torvalds 5321da177e4SLinus TorvaldsRelease Date : Fri Jun 25 18:58:43 EDT 2004 - Atul Mukker <atulm@lsil.com> 5331da177e4SLinus TorvaldsCurrent Version : 2.20.1.0 5341da177e4SLinus TorvaldsOlder Version : megaraid 2.20.0.1 5351da177e4SLinus Torvalds 5361da177e4SLinus Torvaldsi. Stale list pointer in adapter causes kernel panic when module 5371da177e4SLinus Torvalds megaraid_mbox is unloaded 5381da177e4SLinus Torvalds 5391da177e4SLinus Torvalds 5401da177e4SLinus TorvaldsRelease Date : Thu Jun 24 20:37:11 EDT 2004 - Atul Mukker <atulm@lsil.com> 5411da177e4SLinus TorvaldsCurrent Version : 2.20.0.1 5421da177e4SLinus TorvaldsOlder Version : megaraid 2.20.0.00 5431da177e4SLinus Torvalds 5441da177e4SLinus Torvaldsi. Modules are not 'y' by default, but depend on current definition of 5451da177e4SLinus Torvalds SCSI & PCI. 5461da177e4SLinus Torvalds 5471da177e4SLinus Torvaldsii. Redundant structure mraid_driver_t removed. 5481da177e4SLinus Torvalds 5491da177e4SLinus Torvaldsiii. Miscellaneous indentation and goto/label fixes. 5501da177e4SLinus Torvalds - Christoph Hellwig <hch@infradead.org>, 06.24.2004 linux-scsi 5511da177e4SLinus Torvalds 5521da177e4SLinus Torvaldsiv. scsi_host_put(), do just before completing HBA shutdown. 5531da177e4SLinus Torvalds 5541da177e4SLinus Torvalds 5551da177e4SLinus Torvalds 5561da177e4SLinus TorvaldsRelease Date : Mon Jun 21 19:53:54 EDT 2004 - Atul Mukker <atulm@lsil.com> 5571da177e4SLinus TorvaldsCurrent Version : 2.20.0.0 5581da177e4SLinus TorvaldsOlder Version : megaraid 2.20.0.rc2 and 2.00.3 5591da177e4SLinus Torvalds 5601da177e4SLinus Torvaldsi. Independent module to interact with userland applications and 5611da177e4SLinus Torvalds multiplex command to low level RAID module(s). 5621da177e4SLinus Torvalds 5631da177e4SLinus Torvalds "Shared code in a third module, a "library module", is an acceptable 5641da177e4SLinus Torvalds solution. modprobe automatically loads dependent modules, so users 5651da177e4SLinus Torvalds running "modprobe driver1" or "modprobe driver2" would automatically 5661da177e4SLinus Torvalds load the shared library module." 5671da177e4SLinus Torvalds 5681da177e4SLinus Torvalds - Jeff Garzik <jgarzik@pobox.com> 02.25.2004 LKML 5691da177e4SLinus Torvalds 5701da177e4SLinus Torvalds "As Jeff hinted, if your userspace<->driver API is consistent between 5711da177e4SLinus Torvalds your new MPT-based RAID controllers and your existing megaraid driver, 5721da177e4SLinus Torvalds then perhaps you need a single small helper module (lsiioctl or some 5731da177e4SLinus Torvalds better name), loaded by both mptraid and megaraid automatically, which 5741da177e4SLinus Torvalds handles registering the /dev/megaraid node dynamically. In this case, 5751da177e4SLinus Torvalds both mptraid and megaraid would register with lsiioctl for each 5761da177e4SLinus Torvalds adapter discovered, and lsiioctl would essentially be a switch, 5771da177e4SLinus Torvalds redirecting userspace tool ioctls to the appropriate driver." 5781da177e4SLinus Torvalds 5791da177e4SLinus Torvalds - Matt Domsch <Matt_Domsch@dell.com> 02.25.2004 LKML 5801da177e4SLinus Torvalds 5811da177e4SLinus Torvaldsii. Remove C99 initializations from pci_device id. 5821da177e4SLinus Torvalds 5831da177e4SLinus Torvalds "pci_id_table_g would be much more readable when not using C99 5841da177e4SLinus Torvalds initializers. 5851da177e4SLinus Torvalds PCI table doesn't change, there's lots of users that prefer the more 5861da177e4SLinus Torvalds readable variant. And it's really far less and much easier to grok 5871da177e4SLinus Torvalds lines without C99 initializers." 5881da177e4SLinus Torvalds 5891da177e4SLinus Torvalds - Christoph Hellwig <hch@infradead.org>, 05.28.2004 linux-scsi 5901da177e4SLinus Torvalds 5911da177e4SLinus Torvaldsiii. Many fixes as suggested by Christoph Hellwig <hch@infradead.org> on 5921da177e4SLinus Torvalds linux-scsi, 05.28.2004 5931da177e4SLinus Torvalds 5941da177e4SLinus Torvaldsiv. We now support up to 32 parallel ioctl commands instead of current 1. 5951da177e4SLinus Torvalds There is a conscious effort to let memory allocation not fail for ioctl 5961da177e4SLinus Torvalds commands. 5971da177e4SLinus Torvalds 5981da177e4SLinus Torvaldsv. Do away with internal memory management. Use pci_pool_(create|alloc) 5991da177e4SLinus Torvalds instead. 6001da177e4SLinus Torvalds 6011da177e4SLinus Torvaldsvi. Kill tasklet when unloading the driver. 6021da177e4SLinus Torvalds 6031da177e4SLinus Torvaldsvii. Do not use "host_lock', driver has fine-grain locks now to protect all 6041da177e4SLinus Torvalds data structures. 6051da177e4SLinus Torvalds 6061da177e4SLinus Torvaldsviii. Optimize the build scatter-gather list routine. The callers already 6071da177e4SLinus Torvalds know the data transfer address and length. 6081da177e4SLinus Torvalds 6091da177e4SLinus Torvaldsix. Better implementation of error handling and recovery. Driver now 6101da177e4SLinus Torvalds performs extended errors recovery for instances like scsi cable pull. 6111da177e4SLinus Torvalds 6121da177e4SLinus Torvaldsx. Disassociate the management commands with an overlaid scsi command. 6131da177e4SLinus Torvalds Driver now treats the management packets as special packets and has a 6141da177e4SLinus Torvalds dedicated callback routine. 615