162306a36Sopenharmony_ciRelease Date	: Thu Nov 16 15:32:35 EST 2006 -
262306a36Sopenharmony_ci				Sumant Patro <sumant.patro@lsi.com>
362306a36Sopenharmony_ciCurrent Version : 2.20.5.1 (scsi module), 2.20.2.6 (cmm module)
462306a36Sopenharmony_ciOlder Version	: 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci1.	Changes in Initialization to fix kdump failure.
762306a36Sopenharmony_ci	Send SYNC command on loading.
862306a36Sopenharmony_ci	This command clears the pending commands in the adapter
962306a36Sopenharmony_ci	and re-initialize its internal RAID structure.
1062306a36Sopenharmony_ci	Without this change, megaraid driver either panics or fails to
1162306a36Sopenharmony_ci	initialize the adapter during kdump's second kernel boot
1262306a36Sopenharmony_ci	if there are pending commands or interrupts from other devices
1362306a36Sopenharmony_ci	sharing the same IRQ.
1462306a36Sopenharmony_ci2. 	Authors email-id domain name changed from lsil.com to lsi.com.
1562306a36Sopenharmony_ci	Also modified the MODULE_AUTHOR to megaraidlinux@lsi.com
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ciRelease Date	: Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@lsil.com>
1862306a36Sopenharmony_ciCurrent Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
1962306a36Sopenharmony_ciOlder Version	: 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci1.	Fixed a bug in megaraid_init_mbox().
2262306a36Sopenharmony_ci	Customer reported "garbage in file on x86_64 platform".
2362306a36Sopenharmony_ci	Root Cause: the driver registered controllers as 64-bit DMA capable
2462306a36Sopenharmony_ci	for those which are not support it.
2562306a36Sopenharmony_ci	Fix: Made change in the function inserting identification mechanism
2662306a36Sopenharmony_ci	identifying 64-bit DMA capable controllers.
2762306a36Sopenharmony_ci
2862306a36Sopenharmony_ci	> -----Original Message-----
2962306a36Sopenharmony_ci	> From: Vasily Averin [mailto:vvs@sw.ru]
3062306a36Sopenharmony_ci	> Sent: Thursday, May 04, 2006 2:49 PM
3162306a36Sopenharmony_ci	> To: linux-scsi@vger.kernel.org; Kolli, Neela; Mukker, Atul;
3262306a36Sopenharmony_ci	> Ju, Seokmann; Bagalkote, Sreenivas;
3362306a36Sopenharmony_ci	> James.Bottomley@SteelEye.com; devel@openvz.org
3462306a36Sopenharmony_ci	> Subject: megaraid_mbox: garbage in file
3562306a36Sopenharmony_ci	>
3662306a36Sopenharmony_ci	> Hello all,
3762306a36Sopenharmony_ci	>
3862306a36Sopenharmony_ci	> I've investigated customers claim on the unstable work of
3962306a36Sopenharmony_ci	> their node and found a
4062306a36Sopenharmony_ci	> strange effect: reading from some files leads to the
4162306a36Sopenharmony_ci	>  "attempt to access beyond end of device" messages.
4262306a36Sopenharmony_ci	>
4362306a36Sopenharmony_ci	> I've checked filesystem, memory on the node, motherboard BIOS
4462306a36Sopenharmony_ci	> version, but it
4562306a36Sopenharmony_ci	> does not help and issue still has been reproduced by simple
4662306a36Sopenharmony_ci	> file reading.
4762306a36Sopenharmony_ci	>
4862306a36Sopenharmony_ci	> Reproducer is simple:
4962306a36Sopenharmony_ci	>
5062306a36Sopenharmony_ci	> echo 0xffffffff >/proc/sys/dev/scsi/logging_level ;
5162306a36Sopenharmony_ci	> cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt  ;
5262306a36Sopenharmony_ci	> echo 0 >/proc/sys/dev/scsi/logging
5362306a36Sopenharmony_ci	>
5462306a36Sopenharmony_ci	> It leads to the following messages in dmesg
5562306a36Sopenharmony_ci	>
5662306a36Sopenharmony_ci	> sd_init_command: disk=sda, block=871769260, count=26
5762306a36Sopenharmony_ci	> sda : block=871769260
5862306a36Sopenharmony_ci	> sda : reading 26/26 512 byte blocks.
5962306a36Sopenharmony_ci	> scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420)
6062306a36Sopenharmony_ci	> sd 0:1:0:0: send 0xf79ed980                  sd 0:1:0:0:
6162306a36Sopenharmony_ci	>         command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00
6262306a36Sopenharmony_ci	> buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40,
6362306a36Sopenharmony_ci	> queuecommand 0xc0344010
6462306a36Sopenharmony_ci	> leaving scsi_dispatch_cmnd()
6562306a36Sopenharmony_ci	> scsi_delete_timer: scmd: f79ed980, rtn: 1
6662306a36Sopenharmony_ci	> sd 0:1:0:0: done 0xf79ed980 SUCCESS        0 sd 0:1:0:0:
6762306a36Sopenharmony_ci	>         command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00
6862306a36Sopenharmony_ci	> scsi host busy 1 failed 0
6962306a36Sopenharmony_ci	> sd 0:1:0:0: Notifying upper driver of completion (result 0)
7062306a36Sopenharmony_ci	> sd_rw_intr: sda: res=0x0
7162306a36Sopenharmony_ci	> 26 sectors total, 13312 bytes done.
7262306a36Sopenharmony_ci	> use_sg is 4
7362306a36Sopenharmony_ci	> attempt to access beyond end of device
7462306a36Sopenharmony_ci	> sda6: rw=0, want=1044134458, limit=951401367
7562306a36Sopenharmony_ci	> Buffer I/O error on device sda6, logical block 522067228
7662306a36Sopenharmony_ci	> attempt to access beyond end of device
7762306a36Sopenharmony_ci
7862306a36Sopenharmony_ci2.	When INQUIRY with EVPD bit set issued to the MegaRAID controller,
7962306a36Sopenharmony_ci	system memory gets corrupted.
8062306a36Sopenharmony_ci	Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set
8162306a36Sopenharmony_ci	incorrectly.
8262306a36Sopenharmony_ci	Fix: MegaRAID F/W has fixed the problem and being process of release,
8362306a36Sopenharmony_ci	soon. Meanwhile, driver will filter out the request.
8462306a36Sopenharmony_ci
8562306a36Sopenharmony_ci3.	One member in the data structure of the driver leads to unaligned
8662306a36Sopenharmony_ci	issue on 64-bit platform.
8762306a36Sopenharmony_ci	Customer reported "kernel unaligned access address" issue when
8862306a36Sopenharmony_ci	application communicates with MegaRAID HBA driver.
8962306a36Sopenharmony_ci	Root Cause: in uioc_t structure, one of member had misaligned and it
9062306a36Sopenharmony_ci	led system to display the error message.
9162306a36Sopenharmony_ci	Fix: A patch submitted to community from following folk.
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ci	> -----Original Message-----
9462306a36Sopenharmony_ci	> From: linux-scsi-owner@vger.kernel.org
9562306a36Sopenharmony_ci	> [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sakurai Hiroomi
9662306a36Sopenharmony_ci	> Sent: Wednesday, July 12, 2006 4:20 AM
9762306a36Sopenharmony_ci	> To: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
9862306a36Sopenharmony_ci	> Subject: Re: Help: strange messages from kernel on IA64 platform
9962306a36Sopenharmony_ci	>
10062306a36Sopenharmony_ci	> Hi,
10162306a36Sopenharmony_ci	>
10262306a36Sopenharmony_ci	> I saw same message.
10362306a36Sopenharmony_ci	>
10462306a36Sopenharmony_ci	> When GAM(Global Array Manager) is started, The following
10562306a36Sopenharmony_ci	> message output.
10662306a36Sopenharmony_ci	> kernel: kernel unaligned access to 0xe0000001fe1080d4,
10762306a36Sopenharmony_ci	> ip=0xa000000200053371
10862306a36Sopenharmony_ci	>
10962306a36Sopenharmony_ci	> The uioc structure used by ioctl is defined by packed,
11062306a36Sopenharmony_ci	> the allignment of each member are disturbed.
11162306a36Sopenharmony_ci	> In a 64 bit structure, the allignment of member doesn't fit 64 bit
11262306a36Sopenharmony_ci	> boundary. this causes this messages.
11362306a36Sopenharmony_ci	> In a 32 bit structure, we don't see the message because the allinment
11462306a36Sopenharmony_ci	> of member fit 32 bit boundary even if packed is specified.
11562306a36Sopenharmony_ci	>
11662306a36Sopenharmony_ci	> patch
11762306a36Sopenharmony_ci	> I Add 32 bit dummy member to fit 64 bit boundary. I tested.
11862306a36Sopenharmony_ci	> We confirmed this patch fix the problem by IA64 server.
11962306a36Sopenharmony_ci	>
12062306a36Sopenharmony_ci	> **************************************************************
12162306a36Sopenharmony_ci	> ****************
12262306a36Sopenharmony_ci	> --- linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h.orig
12362306a36Sopenharmony_ci	> 2006-04-03 17:13:03.000000000 +0900
12462306a36Sopenharmony_ci	> +++ linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h
12562306a36Sopenharmony_ci	> 2006-04-03 17:14:09.000000000 +0900
12662306a36Sopenharmony_ci	> @@ -132,6 +132,10 @@
12762306a36Sopenharmony_ci	>  /* Driver Data: */
12862306a36Sopenharmony_ci	>          void __user *           user_data;
12962306a36Sopenharmony_ci	>          uint32_t                user_data_len;
13062306a36Sopenharmony_ci	> +
13162306a36Sopenharmony_ci	> +        /* 64bit alignment */
13262306a36Sopenharmony_ci	> +        uint32_t                pad_0xBC;
13362306a36Sopenharmony_ci	> +
13462306a36Sopenharmony_ci	>          mraid_passthru_t        __user *user_pthru;
13562306a36Sopenharmony_ci	>
13662306a36Sopenharmony_ci	>          mraid_passthru_t        *pthru32;
13762306a36Sopenharmony_ci	> **************************************************************
13862306a36Sopenharmony_ci	> ****************
13962306a36Sopenharmony_ci
14062306a36Sopenharmony_ciRelease Date	: Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com>
14162306a36Sopenharmony_ciCurrent Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
14262306a36Sopenharmony_ciOlder Version	: 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
14362306a36Sopenharmony_ci
14462306a36Sopenharmony_ci1.	Fixed a bug in megaraid_reset_handler().
14562306a36Sopenharmony_ci	Customer reported "Unable to handle kernel NULL pointer dereference
14662306a36Sopenharmony_ci	at virtual address 00000000" when system goes to reset condition
14762306a36Sopenharmony_ci	for some reason. It happened randomly.
14862306a36Sopenharmony_ci	Root Cause: in the megaraid_reset_handler(), there is possibility not
14962306a36Sopenharmony_ci	returning pending packets in the pend_list if there are multiple
15062306a36Sopenharmony_ci	pending packets.
15162306a36Sopenharmony_ci	Fix: Made the change in the driver so that it will return all packets
15262306a36Sopenharmony_ci	in the pend_list.
15362306a36Sopenharmony_ci
15462306a36Sopenharmony_ci2.	Added change request.
15562306a36Sopenharmony_ci	As found in the following URL, rmb() only didn't help the
15662306a36Sopenharmony_ci	problem. I had to increase the loop counter to 0xFFFFFF. (6 F's)
15762306a36Sopenharmony_ci	http://marc.theaimsgroup.com/?l=linux-scsi&m=110971060502497&w=2
15862306a36Sopenharmony_ci
15962306a36Sopenharmony_ci	I attached a patch for your reference, too.
16062306a36Sopenharmony_ci	Could you check and get this fix in your driver?
16162306a36Sopenharmony_ci
16262306a36Sopenharmony_ci	Best Regards,
16362306a36Sopenharmony_ci	Jun'ichi Nomura
16462306a36Sopenharmony_ci
16562306a36Sopenharmony_ciRelease Date	: Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
16662306a36Sopenharmony_ciCurrent Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
16762306a36Sopenharmony_ciOlder Version	: 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
16862306a36Sopenharmony_ci
16962306a36Sopenharmony_ci1.	Sorted out PCI IDs to remove megaraid support overlaps.
17062306a36Sopenharmony_ci	Based on the patch from Daniel, sorted out PCI IDs along with
17162306a36Sopenharmony_ci	character node name change from 'megadev' to 'megadev_legacy' to avoid
17262306a36Sopenharmony_ci	conflict.
17362306a36Sopenharmony_ci	---
17462306a36Sopenharmony_ci	Hopefully we'll be getting the build restriction zapped much sooner, 
17562306a36Sopenharmony_ci	but we should also be thinking about totally removing the hardware 
17662306a36Sopenharmony_ci	support overlap in the megaraid drivers.
17762306a36Sopenharmony_ci
17862306a36Sopenharmony_ci	This patch pencils in a date of Feb 06 for this, and performs some 
17962306a36Sopenharmony_ci	printk abuse in hope that existing legacy users might pick up on what's
18062306a36Sopenharmony_ci	going on.
18162306a36Sopenharmony_ci
18262306a36Sopenharmony_ci	Signed-off-by: Daniel Drake <dsd@gentoo.org>
18362306a36Sopenharmony_ci	---
18462306a36Sopenharmony_ci
18562306a36Sopenharmony_ci2.	Fixed a issue: megaraid always fails to reset handler.
18662306a36Sopenharmony_ci	---
18762306a36Sopenharmony_ci	I found that the megaraid driver always fails to reset the
18862306a36Sopenharmony_ci	adapter with the following message:
18962306a36Sopenharmony_ci		megaraid: resetting the host...
19062306a36Sopenharmony_ci		megaraid mbox: reset sequence completed successfully
19162306a36Sopenharmony_ci		megaraid: fast sync command timed out
19262306a36Sopenharmony_ci		megaraid: reservation reset failed
19362306a36Sopenharmony_ci	when the "Cluster mode" of the adapter BIOS is enabled.
19462306a36Sopenharmony_ci	So, whenever the reset occurs, the adapter goes to
19562306a36Sopenharmony_ci	offline and just become unavailable.
19662306a36Sopenharmony_ci
19762306a36Sopenharmony_ci	Jun'ichi Nomura [mailto:jnomura@mtc.biglobe.ne.jp]
19862306a36Sopenharmony_ci	---
19962306a36Sopenharmony_ci
20062306a36Sopenharmony_ciRelease Date	: Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
20162306a36Sopenharmony_ciCurrent Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
20262306a36Sopenharmony_ciOlder Version	: 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
20362306a36Sopenharmony_ci
20462306a36Sopenharmony_ci1.	Added IOCTL backward compatibility.
20562306a36Sopenharmony_ci	Convert megaraid_mm driver to new compat_ioctl entry points.
20662306a36Sopenharmony_ci	I don't have easy access to hardware, so only compile tested.
20762306a36Sopenharmony_ci		- Signed-off-by:Andi Kleen <ak@muc.de>
20862306a36Sopenharmony_ci
20962306a36Sopenharmony_ci2.	megaraid_mbox fix: wrong order of arguments in memset()
21062306a36Sopenharmony_ci	That, BTW, shows why cross-builds are useful-the only indication of
21162306a36Sopenharmony_ci	problem had been a new warning showing up in sparse output on alpha
21262306a36Sopenharmony_ci	build (number of exceeding 256 got truncated).
21362306a36Sopenharmony_ci		- Signed-off-by: Al Viro
21462306a36Sopenharmony_ci		<viro@parcelfarce.linux.theplanet.co.uk>
21562306a36Sopenharmony_ci
21662306a36Sopenharmony_ci3.	Convert pci_module_init to pci_register_driver
21762306a36Sopenharmony_ci	Convert from pci_module_init to pci_register_driver
21862306a36Sopenharmony_ci	(from:http://kernelnewbies.org/KernelJanitors/TODO)
21962306a36Sopenharmony_ci		- Signed-off-by: Domen Puncer <domen@coderock.org>
22062306a36Sopenharmony_ci
22162306a36Sopenharmony_ci4.	Use the pre defined DMA mask constants from dma-mapping.h
22262306a36Sopenharmony_ci	Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling
22362306a36Sopenharmony_ci	pci_set_dma_mask() or pci_set_consistent_dma_mask(). See
22462306a36Sopenharmony_ci	http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for more
22562306a36Sopenharmony_ci	details.
22662306a36Sopenharmony_ci		Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
22762306a36Sopenharmony_ci		Signed-off-by: Domen Puncer <domen@coderock.org>
22862306a36Sopenharmony_ci
22962306a36Sopenharmony_ci5.	Remove SSID checking for Dobson, Lindsay, and Verde based products.
23062306a36Sopenharmony_ci	Checking the SSVID/SSID for controllers which have Dobson, Lindsay,
23162306a36Sopenharmony_ci	and Verde is unnecessary because device ID has been assigned by LSI
23262306a36Sopenharmony_ci	and it is unique value. So, all controllers with these IOPs have to be
23362306a36Sopenharmony_ci	supported by the driver regardless SSVID/SSID.
23462306a36Sopenharmony_ci
23562306a36Sopenharmony_ci6.	Date Thu, 27 Jan 2005 04:31:09 +0100 
23662306a36Sopenharmony_ci	From Herbert Poetzl <> 
23762306a36Sopenharmony_ci	Subject RFC: assert_spin_locked() for 2.6 
23862306a36Sopenharmony_ci
23962306a36Sopenharmony_ci	Greetings!
24062306a36Sopenharmony_ci
24162306a36Sopenharmony_ci	overcautious programming will kill your kernel ;)
24262306a36Sopenharmony_ci	ever thought about checking a spin_lock or even
24362306a36Sopenharmony_ci	asserting that it must be held (maybe just for
24462306a36Sopenharmony_ci	spinlock debugging?) ...
24562306a36Sopenharmony_ci
24662306a36Sopenharmony_ci	there are several checks present in the kernel
24762306a36Sopenharmony_ci	where somebody does a variation on the following:
24862306a36Sopenharmony_ci
24962306a36Sopenharmony_ci	  BUG_ON(!spin_is_locked(&some_lock));
25062306a36Sopenharmony_ci
25162306a36Sopenharmony_ci	so what's wrong about that? nothing, unless you
25262306a36Sopenharmony_ci	compile the code with CONFIG_DEBUG_SPINLOCK but 
25362306a36Sopenharmony_ci	without CONFIG_SMP ... in which case the BUG()
25462306a36Sopenharmony_ci	will kill your kernel ...
25562306a36Sopenharmony_ci
25662306a36Sopenharmony_ci	maybe it's not advised to make such assertions, 
25762306a36Sopenharmony_ci	but here is a solution which works for me ...
25862306a36Sopenharmony_ci	(compile tested for sh, x86_64 and x86, boot/run
25962306a36Sopenharmony_ci	tested for x86 only)
26062306a36Sopenharmony_ci
26162306a36Sopenharmony_ci	best,
26262306a36Sopenharmony_ci	Herbert
26362306a36Sopenharmony_ci
26462306a36Sopenharmony_ci		- Herbert Poetzl <herbert@13thfloor.at>, Thu, 27 Jan 2005
26562306a36Sopenharmony_ci
26662306a36Sopenharmony_ciRelease Date	: Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
26762306a36Sopenharmony_ciCurrent Version	: 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
26862306a36Sopenharmony_ciOlder Version	: 2.20.4.4 (scsi module), 2.20.2.4 (cmm module)
26962306a36Sopenharmony_ci
27062306a36Sopenharmony_ci1.	Modified name of two attributes in scsi_host_template.
27162306a36Sopenharmony_ci	On Wed, 2005-02-02 at 10:56 -0500, Ju, Seokmann wrote:
27262306a36Sopenharmony_ci	> +	.sdev_attrs			= megaraid_device_attrs,
27362306a36Sopenharmony_ci	> +	.shost_attrs			= megaraid_class_device_attrs,
27462306a36Sopenharmony_ci
27562306a36Sopenharmony_ci	These are, perhaps, slightly confusing names.
27662306a36Sopenharmony_ci	The terms device and class_device have well defined meanings in the
27762306a36Sopenharmony_ci	generic device model, neither of which is what you mean here.
27862306a36Sopenharmony_ci	Why not simply megaraid_sdev_attrs and megaraid_shost_attrs?
27962306a36Sopenharmony_ci
28062306a36Sopenharmony_ci	Other than this, it looks fine to me too.
28162306a36Sopenharmony_ci
28262306a36Sopenharmony_ciRelease Date	: Thu Jan 27 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com>
28362306a36Sopenharmony_ciCurrent Version	: 2.20.4.4 (scsi module), 2.20.2.5 (cmm module)
28462306a36Sopenharmony_ciOlder Version	: 2.20.4.3 (scsi module), 2.20.2.4 (cmm module)
28562306a36Sopenharmony_ci
28662306a36Sopenharmony_ci1.	Bump up the version of scsi module due to its conflict.
28762306a36Sopenharmony_ci
28862306a36Sopenharmony_ciRelease Date	: Thu Jan 21 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com>
28962306a36Sopenharmony_ciCurrent Version	: 2.20.4.3 (scsi module), 2.20.2.5 (cmm module)
29062306a36Sopenharmony_ciOlder Version	: 2.20.4.2 (scsi module), 2.20.2.4 (cmm module)
29162306a36Sopenharmony_ci
29262306a36Sopenharmony_ci1.	Remove driver ioctl for logical drive to scsi address translation and
29362306a36Sopenharmony_ci	replace with the sysfs attribute. To remove drives and change
29462306a36Sopenharmony_ci	capacity, application shall now use the device attribute to get the
29562306a36Sopenharmony_ci	logical drive number for a scsi device. For adding newly created
29662306a36Sopenharmony_ci	logical drives, class device attribute would be required to uniquely
29762306a36Sopenharmony_ci	identify each controller.
29862306a36Sopenharmony_ci		- Atul Mukker <atulm@lsil.com>
29962306a36Sopenharmony_ci
30062306a36Sopenharmony_ci	"James, I've been thinking about this a little more, and you may be on
30162306a36Sopenharmony_ci	to something here. Let each driver add files as such:"
30262306a36Sopenharmony_ci
30362306a36Sopenharmony_ci		- Matt Domsch <Matt_Domsch@dell.com>, 12.15.2004
30462306a36Sopenharmony_ci		 linux-scsi mailing list
30562306a36Sopenharmony_ci
30662306a36Sopenharmony_ci
30762306a36Sopenharmony_ci	"Then, if you simply publish your LD number as an extra parameter of
30862306a36Sopenharmony_ci	the device, you can look through /sys to find it."
30962306a36Sopenharmony_ci
31062306a36Sopenharmony_ci		- James Bottomley <James.Bottomley@SteelEye.com>, 01.03.2005
31162306a36Sopenharmony_ci		 linux-scsi mailing list
31262306a36Sopenharmony_ci
31362306a36Sopenharmony_ci
31462306a36Sopenharmony_ci	"I don't see why not ... it's your driver, you can publish whatever
31562306a36Sopenharmony_ci	extra information you need as scsi_device attributes; that was one of
31662306a36Sopenharmony_ci	the designs of the extensible attribute system."
31762306a36Sopenharmony_ci
31862306a36Sopenharmony_ci		- James Bottomley <James.Bottomley@SteelEye.com>, 01.06.2005
31962306a36Sopenharmony_ci		 linux-scsi mailing list
32062306a36Sopenharmony_ci
32162306a36Sopenharmony_ci2.	Add AMI megaraid support - Brian King <brking@charter.net>
32262306a36Sopenharmony_ci		PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
32362306a36Sopenharmony_ci		PCI_VENDOR_ID_AMI, PCI_SUBSYS_ID_PERC3_DC,
32462306a36Sopenharmony_ci
32562306a36Sopenharmony_ci3.	Make some code static - Adrian Bunk <bunk@stusta.de>
32662306a36Sopenharmony_ci	Date:	Mon, 15 Nov 2004 03:14:57 +0100
32762306a36Sopenharmony_ci
32862306a36Sopenharmony_ci	The patch below makes some needlessly global code static.
32962306a36Sopenharmony_ci	-wait_queue_head_t wait_q;
33062306a36Sopenharmony_ci	+static wait_queue_head_t wait_q;
33162306a36Sopenharmony_ci
33262306a36Sopenharmony_ci	Signed-off-by: Adrian Bunk <bunk@stusta.de>
33362306a36Sopenharmony_ci
33462306a36Sopenharmony_ci4.	Added NEC ROMB support - NEC MegaRAID PCI Express ROMB controller
33562306a36Sopenharmony_ci		PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E,
33662306a36Sopenharmony_ci		PCI_SUBSYS_ID_NEC, PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E,
33762306a36Sopenharmony_ci
33862306a36Sopenharmony_ci5.	Fixed Tape drive issue : For any Direct CDB command to physical device
33962306a36Sopenharmony_ci	including tape, timeout value set by driver was 10 minutes. With this 
34062306a36Sopenharmony_ci	value, most of command will return within timeout. However, for those
34162306a36Sopenharmony_ci	command like ERASE or FORMAT, it takes more than an hour depends on
34262306a36Sopenharmony_ci	capacity of the device and the command could be terminated before it 
34362306a36Sopenharmony_ci	completes.
34462306a36Sopenharmony_ci	To address this issue, the 'timeout' field in the DCDB command will 
34562306a36Sopenharmony_ci	have NO TIMEOUT (i.e., 4) value as its timeout on DCDB command.
34662306a36Sopenharmony_ci
34762306a36Sopenharmony_ci
34862306a36Sopenharmony_ci
34962306a36Sopenharmony_ciRelease Date	: Thu Dec  9 19:10:23 EST 2004
35062306a36Sopenharmony_ci	- Sreenivas Bagalkote <sreenib@lsil.com>
35162306a36Sopenharmony_ci
35262306a36Sopenharmony_ciCurrent Version	: 2.20.4.2 (scsi module), 2.20.2.4 (cmm module)
35362306a36Sopenharmony_ciOlder Version	: 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
35462306a36Sopenharmony_ci
35562306a36Sopenharmony_cii.	Introduced driver ioctl that returns scsi address for a given ld.
35662306a36Sopenharmony_ci	
35762306a36Sopenharmony_ci	"Why can't the existing sysfs interfaces be used to do this?"
35862306a36Sopenharmony_ci		- Brian King (brking@us.ibm.com)
35962306a36Sopenharmony_ci	
36062306a36Sopenharmony_ci	"I've looked into solving this another way, but I cannot see how
36162306a36Sopenharmony_ci	to get this driver-private mapping of logical drive number-> HCTL
36262306a36Sopenharmony_ci	without putting code something like this into the driver."
36362306a36Sopenharmony_ci
36462306a36Sopenharmony_ci	"...and by providing a mapping a function to userspace, the driver
36562306a36Sopenharmony_ci	is free to change its mapping algorithm in the future if necessary .."
36662306a36Sopenharmony_ci		- Matt Domsch (Matt_Domsch@dell.com)
36762306a36Sopenharmony_ci
36862306a36Sopenharmony_ciRelease Date	: Thu Dec  9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
36962306a36Sopenharmony_ci
37062306a36Sopenharmony_ciCurrent Version	: 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
37162306a36Sopenharmony_ciOlder Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
37262306a36Sopenharmony_ci
37362306a36Sopenharmony_cii.	Fix a bug in kioc's dma buffer deallocation
37462306a36Sopenharmony_ci
37562306a36Sopenharmony_ciRelease Date	: Thu Nov  4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
37662306a36Sopenharmony_ci
37762306a36Sopenharmony_ciCurrent Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
37862306a36Sopenharmony_ciOlder Version	: 2.20.4.0 (scsi module), 2.20.2.1 (cmm module)
37962306a36Sopenharmony_ci
38062306a36Sopenharmony_cii.	Handle IOCTL cmd timeouts more properly.
38162306a36Sopenharmony_ci
38262306a36Sopenharmony_ciii.	pci_dma_sync_{sg,single}_for_cpu was introduced into megaraid_mbox
38362306a36Sopenharmony_ci	incorrectly (instead of _for_device). Changed to appropriate 
38462306a36Sopenharmony_ci	pci_dma_sync_{sg,single}_for_device.
38562306a36Sopenharmony_ci
38662306a36Sopenharmony_ciRelease Date	: Wed Oct 06 11:15:29 EDT 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
38762306a36Sopenharmony_ciCurrent Version	: 2.20.4.0 (scsi module), 2.20.2.1 (cmm module)
38862306a36Sopenharmony_ciOlder Version	: 2.20.4.0 (scsi module), 2.20.2.0 (cmm module)
38962306a36Sopenharmony_ci
39062306a36Sopenharmony_cii.	Remove CONFIG_COMPAT around register_ioctl32_conversion
39162306a36Sopenharmony_ci
39262306a36Sopenharmony_ciRelease Date	: Mon Sep 27 22:15:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
39362306a36Sopenharmony_ciCurrent Version	: 2.20.4.0 (scsi module), 2.20.2.0 (cmm module)
39462306a36Sopenharmony_ciOlder Version	: 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
39562306a36Sopenharmony_ci
39662306a36Sopenharmony_cii.	Fix data corruption. Because of a typo in the driver, the IO packets
39762306a36Sopenharmony_ci	were wrongly shared by the ioctl path. This causes a whole IO command
39862306a36Sopenharmony_ci	to be replaced by an incoming ioctl command.
39962306a36Sopenharmony_ci
40062306a36Sopenharmony_ciRelease Date	: Tue Aug 24 09:43:35 EDT 2004 - Atul Mukker <atulm@lsil.com>
40162306a36Sopenharmony_ciCurrent Version	: 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
40262306a36Sopenharmony_ciOlder Version	: 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
40362306a36Sopenharmony_ci
40462306a36Sopenharmony_cii.	Function reordering so that inline functions are defined before they
40562306a36Sopenharmony_ci	are actually used. It is now mandatory for GCC 3.4.1 (current stable)
40662306a36Sopenharmony_ci
40762306a36Sopenharmony_ci	Declare some heavy-weight functions to be non-inlined,
40862306a36Sopenharmony_ci	megaraid_mbox_build_cmd, megaraid_mbox_runpendq,
40962306a36Sopenharmony_ci	megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru,
41062306a36Sopenharmony_ci	megaraid_busywait_mbox
41162306a36Sopenharmony_ci
41262306a36Sopenharmony_ci		- Andrew Morton, 08.19.2004
41362306a36Sopenharmony_ci		linux-scsi mailing list
41462306a36Sopenharmony_ci
41562306a36Sopenharmony_ci	"Something else to clean up after inclusion: every instance of an
41662306a36Sopenharmony_ci	inline function is actually rendered as a full function call, because
41762306a36Sopenharmony_ci	the function is always used before it is defined.  Atul, please
41862306a36Sopenharmony_ci	re-arrange the code to eliminate the need for most (all) of the
41962306a36Sopenharmony_ci	function prototypes at the top of each file, and define (not just
42062306a36Sopenharmony_ci	declare with a prototype) each inline function before its first use"
42162306a36Sopenharmony_ci
42262306a36Sopenharmony_ci		- Matt Domsch <Matt_Domsch@dell.com>, 07.27.2004
42362306a36Sopenharmony_ci		linux-scsi mailing list
42462306a36Sopenharmony_ci
42562306a36Sopenharmony_ci
42662306a36Sopenharmony_ciii.	Display elapsed time (countdown) while waiting for FW to boot.
42762306a36Sopenharmony_ci
42862306a36Sopenharmony_ciiii.	Module compilation reorder in Makefile so that unresolved symbols do
42962306a36Sopenharmony_ci	not occur when driver is compiled non-modular.
43062306a36Sopenharmony_ci
43162306a36Sopenharmony_ci		Patrick J. LoPresti <patl@users.sourceforge.net>, 8.22.2004
43262306a36Sopenharmony_ci		linux-scsi mailing list
43362306a36Sopenharmony_ci
43462306a36Sopenharmony_ci
43562306a36Sopenharmony_ciRelease Date	: Thu Aug 19 09:58:33 EDT 2004 - Atul Mukker <atulm@lsil.com>
43662306a36Sopenharmony_ciCurrent Version	: 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
43762306a36Sopenharmony_ciOlder Version	: 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
43862306a36Sopenharmony_ci
43962306a36Sopenharmony_cii.	When copying the mailbox packets, copy only first 14 bytes (for 32-bit
44062306a36Sopenharmony_ci	mailboxes) and only first 22 bytes (for 64-bit mailboxes). This is to
44162306a36Sopenharmony_ci	avoid getting the stale values for busy bit. We want to set the busy
44262306a36Sopenharmony_ci	bit just before issuing command to the FW.
44362306a36Sopenharmony_ci
44462306a36Sopenharmony_ciii.	In the reset handling, if the reset command is not owned by the
44562306a36Sopenharmony_ci	driver, do not (wrongly) print information for the "attached" driver
44662306a36Sopenharmony_ci	packet.
44762306a36Sopenharmony_ci
44862306a36Sopenharmony_ciiii.	Have extended wait when issuing command in synchronous mode. This is
44962306a36Sopenharmony_ci	required for the cases where the option ROM is disabled and there is
45062306a36Sopenharmony_ci	no BIOS to start the controller. The FW starts to boot after receiving
45162306a36Sopenharmony_ci	the first command from the driver. The current driver has 1 second
45262306a36Sopenharmony_ci	timeout for the synchronous commands, which is far less than what is
45362306a36Sopenharmony_ci	actually required. We now wait up to MBOX_RESET_TIME (180 seconds) for
45462306a36Sopenharmony_ci	FW boot process.
45562306a36Sopenharmony_ci
45662306a36Sopenharmony_ciiv.	In megaraid_mbox_product_info, clear the mailbox contents completely
45762306a36Sopenharmony_ci	before preparing the command for inquiry3. This is to ensure that the
45862306a36Sopenharmony_ci	FW does not get junk values in the command.
45962306a36Sopenharmony_ci
46062306a36Sopenharmony_civ.	Do away with the redundant LSI_CONFIG_COMPAT redefinition for
46162306a36Sopenharmony_ci	CONFIG_COMPAT. Replace <asm/ioctl32.h> with <linux/ioctl32.h>
46262306a36Sopenharmony_ci
46362306a36Sopenharmony_ci		- James Bottomley <James.Bottomley@SteelEye.com>, 08.17.2004
46462306a36Sopenharmony_ci		 linux-scsi mailing list
46562306a36Sopenharmony_ci
46662306a36Sopenharmony_civi.	Add support for 64-bit applications. Current drivers assume only
46762306a36Sopenharmony_ci	32-bit applications, even on 64-bit platforms. Use the "data" and
46862306a36Sopenharmony_ci	"buffer" fields of the mimd_t structure, instead of embedded 32-bit
46962306a36Sopenharmony_ci	addresses in application mailbox and passthru structures.
47062306a36Sopenharmony_ci
47162306a36Sopenharmony_civii.	Move the function declarations for the management module from
47262306a36Sopenharmony_ci	megaraid_mm.h to megaraid_mm.c
47362306a36Sopenharmony_ci
47462306a36Sopenharmony_ci		- Andrew Morton, 08.19.2004
47562306a36Sopenharmony_ci		linux-scsi mailing list
47662306a36Sopenharmony_ci
47762306a36Sopenharmony_civiii.	Change default values for MEGARAID_NEWGEN, MEGARAID_MM, and
47862306a36Sopenharmony_ci	MEGARAID_MAILBOX to 'n' in Kconfig.megaraid
47962306a36Sopenharmony_ci
48062306a36Sopenharmony_ci		- Andrew Morton, 08.19.2004
48162306a36Sopenharmony_ci		linux-scsi mailing list
48262306a36Sopenharmony_ci
48362306a36Sopenharmony_ciix.	replace udelay with msleep
48462306a36Sopenharmony_ci
48562306a36Sopenharmony_cix.	Typos corrected in comments and whitespace adjustments, explicit
48662306a36Sopenharmony_ci	grouping of expressions.
48762306a36Sopenharmony_ci
48862306a36Sopenharmony_ci
48962306a36Sopenharmony_ciRelease Date	: Fri Jul 23 15:22:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
49062306a36Sopenharmony_ciCurrent Version	: 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
49162306a36Sopenharmony_ciOlder Version	: 2.20.1.0 (scsi module), 2.20.0.0 (cmm module)
49262306a36Sopenharmony_ci
49362306a36Sopenharmony_cii.	Add PCI ids for Acer ROMB 2E solution
49462306a36Sopenharmony_ci
49562306a36Sopenharmony_ciii.	Add PCI ids for I4
49662306a36Sopenharmony_ci
49762306a36Sopenharmony_ciiii.	Typo corrected for subsys id for megaraid sata 300-4x
49862306a36Sopenharmony_ci
49962306a36Sopenharmony_ciiv.	Remove yield() while mailbox handshake in synchronous commands
50062306a36Sopenharmony_ci
50162306a36Sopenharmony_ci
50262306a36Sopenharmony_ci	"My other main gripe is things like this:
50362306a36Sopenharmony_ci
50462306a36Sopenharmony_ci	+	// wait for maximum 1 second for status to post
50562306a36Sopenharmony_ci	+	for (i = 0; i < 40000; i++) {
50662306a36Sopenharmony_ci	+		if (mbox->numstatus != 0xFF) break;
50762306a36Sopenharmony_ci	+		udelay(25); yield();
50862306a36Sopenharmony_ci	+	}
50962306a36Sopenharmony_ci
51062306a36Sopenharmony_ci	which litter the driver.  Use of yield() in drivers is deprecated."
51162306a36Sopenharmony_ci
51262306a36Sopenharmony_ci		- James Bottomley <James.Bottomley@SteelEye.com>, 07.14.2004
51362306a36Sopenharmony_ci		 linux-scsi mailing list
51462306a36Sopenharmony_ci
51562306a36Sopenharmony_civ.	Remove redundant __megaraid_busywait_mbox routine
51662306a36Sopenharmony_ci
51762306a36Sopenharmony_civi.	Fix bug in the management module, which causes a system lockup when the
51862306a36Sopenharmony_ci	IO module is loaded and then unloaded, followed by executing any
51962306a36Sopenharmony_ci	management utility. The current version of management module does not
52062306a36Sopenharmony_ci	handle the adapter unregister properly.
52162306a36Sopenharmony_ci
52262306a36Sopenharmony_ci	Specifically, it still keeps a reference to the unregistered
52362306a36Sopenharmony_ci	controllers. To avoid this, the static array adapters has been
52462306a36Sopenharmony_ci	replaced by a dynamic list, which gets updated every time an adapter
52562306a36Sopenharmony_ci	is added or removed.
52662306a36Sopenharmony_ci
52762306a36Sopenharmony_ci	Also, during unregistration of the IO module, the resources are
52862306a36Sopenharmony_ci	now released in the exact reverse order of the allocation time
52962306a36Sopenharmony_ci	sequence.
53062306a36Sopenharmony_ci
53162306a36Sopenharmony_ci
53262306a36Sopenharmony_ciRelease Date	: Fri Jun 25 18:58:43 EDT 2004 - Atul Mukker <atulm@lsil.com>
53362306a36Sopenharmony_ciCurrent Version	: 2.20.1.0
53462306a36Sopenharmony_ciOlder Version	: megaraid 2.20.0.1
53562306a36Sopenharmony_ci
53662306a36Sopenharmony_cii.	Stale list pointer in adapter causes kernel panic when module
53762306a36Sopenharmony_ci	megaraid_mbox is unloaded
53862306a36Sopenharmony_ci
53962306a36Sopenharmony_ci
54062306a36Sopenharmony_ciRelease Date	: Thu Jun 24 20:37:11 EDT 2004 - Atul Mukker <atulm@lsil.com>
54162306a36Sopenharmony_ciCurrent Version	: 2.20.0.1
54262306a36Sopenharmony_ciOlder Version	: megaraid 2.20.0.00
54362306a36Sopenharmony_ci
54462306a36Sopenharmony_cii.	Modules are not 'y' by default, but depend on current definition of
54562306a36Sopenharmony_ci	SCSI & PCI.
54662306a36Sopenharmony_ci
54762306a36Sopenharmony_ciii.	Redundant structure mraid_driver_t removed.
54862306a36Sopenharmony_ci
54962306a36Sopenharmony_ciiii.	Miscellaneous indentation and goto/label fixes.
55062306a36Sopenharmony_ci		- Christoph Hellwig <hch@infradead.org>, 06.24.2004 linux-scsi
55162306a36Sopenharmony_ci
55262306a36Sopenharmony_ciiv.	scsi_host_put(), do just before completing HBA shutdown.
55362306a36Sopenharmony_ci
55462306a36Sopenharmony_ci
55562306a36Sopenharmony_ci
55662306a36Sopenharmony_ciRelease Date	: Mon Jun 21 19:53:54 EDT 2004 - Atul Mukker <atulm@lsil.com>
55762306a36Sopenharmony_ciCurrent Version	: 2.20.0.0
55862306a36Sopenharmony_ciOlder Version	: megaraid 2.20.0.rc2 and 2.00.3
55962306a36Sopenharmony_ci
56062306a36Sopenharmony_cii.	Independent module to interact with userland applications and
56162306a36Sopenharmony_ci	multiplex command to low level RAID module(s).
56262306a36Sopenharmony_ci
56362306a36Sopenharmony_ci	"Shared code in a third module, a "library module", is an acceptable
56462306a36Sopenharmony_ci	solution. modprobe automatically loads dependent modules, so users
56562306a36Sopenharmony_ci	running "modprobe driver1" or "modprobe driver2" would automatically
56662306a36Sopenharmony_ci	load the shared library module."
56762306a36Sopenharmony_ci
56862306a36Sopenharmony_ci		- Jeff Garzik <jgarzik@pobox.com> 02.25.2004 LKML
56962306a36Sopenharmony_ci
57062306a36Sopenharmony_ci	"As Jeff hinted, if your userspace<->driver API is consistent between
57162306a36Sopenharmony_ci	your new MPT-based RAID controllers and your existing megaraid driver,
57262306a36Sopenharmony_ci	then perhaps you need a single small helper module (lsiioctl or some
57362306a36Sopenharmony_ci	better name), loaded by both mptraid and megaraid automatically, which
57462306a36Sopenharmony_ci	handles registering the /dev/megaraid node dynamically. In this case,
57562306a36Sopenharmony_ci	both mptraid and megaraid would register with lsiioctl for each
57662306a36Sopenharmony_ci	adapter discovered, and lsiioctl would essentially be a switch,
57762306a36Sopenharmony_ci	redirecting userspace tool ioctls to the appropriate driver."
57862306a36Sopenharmony_ci
57962306a36Sopenharmony_ci		- Matt Domsch <Matt_Domsch@dell.com> 02.25.2004 LKML
58062306a36Sopenharmony_ci
58162306a36Sopenharmony_ciii.	Remove C99 initializations from pci_device id.
58262306a36Sopenharmony_ci
58362306a36Sopenharmony_ci	"pci_id_table_g would be much more readable when not using C99
58462306a36Sopenharmony_ci	initializers.
58562306a36Sopenharmony_ci	PCI table doesn't change, there's lots of users that prefer the more
58662306a36Sopenharmony_ci	readable variant.  And it's really far less and much easier to grok
58762306a36Sopenharmony_ci	lines without C99 initializers."
58862306a36Sopenharmony_ci
58962306a36Sopenharmony_ci		- Christoph Hellwig <hch@infradead.org>, 05.28.2004 linux-scsi
59062306a36Sopenharmony_ci
59162306a36Sopenharmony_ciiii.	Many fixes as suggested by Christoph Hellwig <hch@infradead.org> on
59262306a36Sopenharmony_ci	linux-scsi, 05.28.2004
59362306a36Sopenharmony_ci
59462306a36Sopenharmony_ciiv.	We now support up to 32 parallel ioctl commands instead of current 1.
59562306a36Sopenharmony_ci	There is a conscious effort to let memory allocation not fail for ioctl
59662306a36Sopenharmony_ci	commands.
59762306a36Sopenharmony_ci
59862306a36Sopenharmony_civ.	Do away with internal memory management. Use pci_pool_(create|alloc)
59962306a36Sopenharmony_ci	instead.
60062306a36Sopenharmony_ci
60162306a36Sopenharmony_civi.	Kill tasklet when unloading the driver.
60262306a36Sopenharmony_ci
60362306a36Sopenharmony_civii.	Do not use "host_lock', driver has fine-grain locks now to protect all
60462306a36Sopenharmony_ci	data structures.
60562306a36Sopenharmony_ci
60662306a36Sopenharmony_civiii.	Optimize the build scatter-gather list routine. The callers already
60762306a36Sopenharmony_ci	know the data transfer address and length.
60862306a36Sopenharmony_ci
60962306a36Sopenharmony_ciix.	Better implementation of error handling and recovery. Driver now
61062306a36Sopenharmony_ci	performs extended errors recovery for instances like scsi cable pull.
61162306a36Sopenharmony_ci
61262306a36Sopenharmony_cix.	Disassociate the management commands with an overlaid scsi command.
61362306a36Sopenharmony_ci	Driver now treats the management packets as special packets and has a
61462306a36Sopenharmony_ci	dedicated callback routine.
615