xref: /OK3568_Linux_fs/kernel/Documentation/scsi/ChangeLog.megaraid (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunRelease Date	: Thu Nov 16 15:32:35 EST 2006 -
2*4882a593Smuzhiyun				Sumant Patro <sumant.patro@lsi.com>
3*4882a593SmuzhiyunCurrent Version : 2.20.5.1 (scsi module), 2.20.2.6 (cmm module)
4*4882a593SmuzhiyunOlder Version	: 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
5*4882a593Smuzhiyun
6*4882a593Smuzhiyun1.	Changes in Initialization to fix kdump failure.
7*4882a593Smuzhiyun	Send SYNC command on loading.
8*4882a593Smuzhiyun	This command clears the pending commands in the adapter
9*4882a593Smuzhiyun	and re-initialize its internal RAID structure.
10*4882a593Smuzhiyun	Without this change, megaraid driver either panics or fails to
11*4882a593Smuzhiyun	initialize the adapter during kdump's second kernel boot
12*4882a593Smuzhiyun	if there are pending commands or interrupts from other devices
13*4882a593Smuzhiyun	sharing the same IRQ.
14*4882a593Smuzhiyun2. 	Authors email-id domain name changed from lsil.com to lsi.com.
15*4882a593Smuzhiyun	Also modified the MODULE_AUTHOR to megaraidlinux@lsi.com
16*4882a593Smuzhiyun
17*4882a593SmuzhiyunRelease Date	: Fri May 19 09:31:45 EST 2006 - Seokmann Ju <sju@lsil.com>
18*4882a593SmuzhiyunCurrent Version : 2.20.4.9 (scsi module), 2.20.2.6 (cmm module)
19*4882a593SmuzhiyunOlder Version	: 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun1.	Fixed a bug in megaraid_init_mbox().
22*4882a593Smuzhiyun	Customer reported "garbage in file on x86_64 platform".
23*4882a593Smuzhiyun	Root Cause: the driver registered controllers as 64-bit DMA capable
24*4882a593Smuzhiyun	for those which are not support it.
25*4882a593Smuzhiyun	Fix: Made change in the function inserting identification machanism
26*4882a593Smuzhiyun	identifying 64-bit DMA capable controllers.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun	> -----Original Message-----
29*4882a593Smuzhiyun	> From: Vasily Averin [mailto:vvs@sw.ru]
30*4882a593Smuzhiyun	> Sent: Thursday, May 04, 2006 2:49 PM
31*4882a593Smuzhiyun	> To: linux-scsi@vger.kernel.org; Kolli, Neela; Mukker, Atul;
32*4882a593Smuzhiyun	> Ju, Seokmann; Bagalkote, Sreenivas;
33*4882a593Smuzhiyun	> James.Bottomley@SteelEye.com; devel@openvz.org
34*4882a593Smuzhiyun	> Subject: megaraid_mbox: garbage in file
35*4882a593Smuzhiyun	>
36*4882a593Smuzhiyun	> Hello all,
37*4882a593Smuzhiyun	>
38*4882a593Smuzhiyun	> I've investigated customers claim on the unstable work of
39*4882a593Smuzhiyun	> their node and found a
40*4882a593Smuzhiyun	> strange effect: reading from some files leads to the
41*4882a593Smuzhiyun	>  "attempt to access beyond end of device" messages.
42*4882a593Smuzhiyun	>
43*4882a593Smuzhiyun	> I've checked filesystem, memory on the node, motherboard BIOS
44*4882a593Smuzhiyun	> version, but it
45*4882a593Smuzhiyun	> does not help and issue still has been reproduced by simple
46*4882a593Smuzhiyun	> file reading.
47*4882a593Smuzhiyun	>
48*4882a593Smuzhiyun	> Reproducer is simple:
49*4882a593Smuzhiyun	>
50*4882a593Smuzhiyun	> echo 0xffffffff >/proc/sys/dev/scsi/logging_level ;
51*4882a593Smuzhiyun	> cat /vz/private/101/root/etc/ld.so.cache >/tmp/ttt  ;
52*4882a593Smuzhiyun	> echo 0 >/proc/sys/dev/scsi/logging
53*4882a593Smuzhiyun	>
54*4882a593Smuzhiyun	> It leads to the following messages in dmesg
55*4882a593Smuzhiyun	>
56*4882a593Smuzhiyun	> sd_init_command: disk=sda, block=871769260, count=26
57*4882a593Smuzhiyun	> sda : block=871769260
58*4882a593Smuzhiyun	> sda : reading 26/26 512 byte blocks.
59*4882a593Smuzhiyun	> scsi_add_timer: scmd: f79ed980, time: 7500, (c02b1420)
60*4882a593Smuzhiyun	> sd 0:1:0:0: send 0xf79ed980                  sd 0:1:0:0:
61*4882a593Smuzhiyun	>         command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00
62*4882a593Smuzhiyun	> buffer = 0xf7cfb540, bufflen = 13312, done = 0xc0366b40,
63*4882a593Smuzhiyun	> queuecommand 0xc0344010
64*4882a593Smuzhiyun	> leaving scsi_dispatch_cmnd()
65*4882a593Smuzhiyun	> scsi_delete_timer: scmd: f79ed980, rtn: 1
66*4882a593Smuzhiyun	> sd 0:1:0:0: done 0xf79ed980 SUCCESS        0 sd 0:1:0:0:
67*4882a593Smuzhiyun	>         command: Read (10): 28 00 33 f6 24 ac 00 00 1a 00
68*4882a593Smuzhiyun	> scsi host busy 1 failed 0
69*4882a593Smuzhiyun	> sd 0:1:0:0: Notifying upper driver of completion (result 0)
70*4882a593Smuzhiyun	> sd_rw_intr: sda: res=0x0
71*4882a593Smuzhiyun	> 26 sectors total, 13312 bytes done.
72*4882a593Smuzhiyun	> use_sg is 4
73*4882a593Smuzhiyun	> attempt to access beyond end of device
74*4882a593Smuzhiyun	> sda6: rw=0, want=1044134458, limit=951401367
75*4882a593Smuzhiyun	> Buffer I/O error on device sda6, logical block 522067228
76*4882a593Smuzhiyun	> attempt to access beyond end of device
77*4882a593Smuzhiyun
78*4882a593Smuzhiyun2.	When INQUIRY with EVPD bit set issued to the MegaRAID controller,
79*4882a593Smuzhiyun	system memory gets corrupted.
80*4882a593Smuzhiyun	Root Cause: MegaRAID F/W handle the INQUIRY with EVPD bit set
81*4882a593Smuzhiyun	incorrectly.
82*4882a593Smuzhiyun	Fix: MegaRAID F/W has fixed the problem and being process of release,
83*4882a593Smuzhiyun	soon. Meanwhile, driver will filter out the request.
84*4882a593Smuzhiyun
85*4882a593Smuzhiyun3.	One of member in the data structure of the driver leads unaligne
86*4882a593Smuzhiyun	issue on 64-bit platform.
87*4882a593Smuzhiyun	Customer reporeted "kernel unaligned access addrss" issue when
88*4882a593Smuzhiyun	application communicates with MegaRAID HBA driver.
89*4882a593Smuzhiyun	Root Cause: in uioc_t structure, one of member had misaligned and it
90*4882a593Smuzhiyun	led system to display the error message.
91*4882a593Smuzhiyun	Fix: A patch submitted to community from following folk.
92*4882a593Smuzhiyun
93*4882a593Smuzhiyun	> -----Original Message-----
94*4882a593Smuzhiyun	> From: linux-scsi-owner@vger.kernel.org
95*4882a593Smuzhiyun	> [mailto:linux-scsi-owner@vger.kernel.org] On Behalf Of Sakurai Hiroomi
96*4882a593Smuzhiyun	> Sent: Wednesday, July 12, 2006 4:20 AM
97*4882a593Smuzhiyun	> To: linux-scsi@vger.kernel.org; linux-kernel@vger.kernel.org
98*4882a593Smuzhiyun	> Subject: Re: Help: strange messages from kernel on IA64 platform
99*4882a593Smuzhiyun	>
100*4882a593Smuzhiyun	> Hi,
101*4882a593Smuzhiyun	>
102*4882a593Smuzhiyun	> I saw same message.
103*4882a593Smuzhiyun	>
104*4882a593Smuzhiyun	> When GAM(Global Array Manager) is started, The following
105*4882a593Smuzhiyun	> message output.
106*4882a593Smuzhiyun	> kernel: kernel unaligned access to 0xe0000001fe1080d4,
107*4882a593Smuzhiyun	> ip=0xa000000200053371
108*4882a593Smuzhiyun	>
109*4882a593Smuzhiyun	> The uioc structure used by ioctl is defined by packed,
110*4882a593Smuzhiyun	> the allignment of each member are disturbed.
111*4882a593Smuzhiyun	> In a 64 bit structure, the allignment of member doesn't fit 64 bit
112*4882a593Smuzhiyun	> boundary. this causes this messages.
113*4882a593Smuzhiyun	> In a 32 bit structure, we don't see the message because the allinment
114*4882a593Smuzhiyun	> of member fit 32 bit boundary even if packed is specified.
115*4882a593Smuzhiyun	>
116*4882a593Smuzhiyun	> patch
117*4882a593Smuzhiyun	> I Add 32 bit dummy member to fit 64 bit boundary. I tested.
118*4882a593Smuzhiyun	> We confirmed this patch fix the problem by IA64 server.
119*4882a593Smuzhiyun	>
120*4882a593Smuzhiyun	> **************************************************************
121*4882a593Smuzhiyun	> ****************
122*4882a593Smuzhiyun	> --- linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h.orig
123*4882a593Smuzhiyun	> 2006-04-03 17:13:03.000000000 +0900
124*4882a593Smuzhiyun	> +++ linux-2.6.9/drivers/scsi/megaraid/megaraid_ioctl.h
125*4882a593Smuzhiyun	> 2006-04-03 17:14:09.000000000 +0900
126*4882a593Smuzhiyun	> @@ -132,6 +132,10 @@
127*4882a593Smuzhiyun	>  /* Driver Data: */
128*4882a593Smuzhiyun	>          void __user *           user_data;
129*4882a593Smuzhiyun	>          uint32_t                user_data_len;
130*4882a593Smuzhiyun	> +
131*4882a593Smuzhiyun	> +        /* 64bit alignment */
132*4882a593Smuzhiyun	> +        uint32_t                pad_0xBC;
133*4882a593Smuzhiyun	> +
134*4882a593Smuzhiyun	>          mraid_passthru_t        __user *user_pthru;
135*4882a593Smuzhiyun	>
136*4882a593Smuzhiyun	>          mraid_passthru_t        *pthru32;
137*4882a593Smuzhiyun	> **************************************************************
138*4882a593Smuzhiyun	> ****************
139*4882a593Smuzhiyun
140*4882a593SmuzhiyunRelease Date	: Mon Apr 11 12:27:22 EST 2006 - Seokmann Ju <sju@lsil.com>
141*4882a593SmuzhiyunCurrent Version : 2.20.4.8 (scsi module), 2.20.2.6 (cmm module)
142*4882a593SmuzhiyunOlder Version	: 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
143*4882a593Smuzhiyun
144*4882a593Smuzhiyun1.	Fixed a bug in megaraid_reset_handler().
145*4882a593Smuzhiyun	Customer reported "Unable to handle kernel NULL pointer dereference
146*4882a593Smuzhiyun	at virtual address 00000000" when system goes to reset condition
147*4882a593Smuzhiyun	for some reason. It happened randomly.
148*4882a593Smuzhiyun	Root Cause: in the megaraid_reset_handler(), there is possibility not
149*4882a593Smuzhiyun	returning pending packets in the pend_list if there are multiple
150*4882a593Smuzhiyun	pending packets.
151*4882a593Smuzhiyun	Fix: Made the change in the driver so that it will return all packets
152*4882a593Smuzhiyun	in the pend_list.
153*4882a593Smuzhiyun
154*4882a593Smuzhiyun2.	Added change request.
155*4882a593Smuzhiyun	As found in the following URL, rmb() only didn't help the
156*4882a593Smuzhiyun	problem. I had to increase the loop counter to 0xFFFFFF. (6 F's)
157*4882a593Smuzhiyun	http://marc.theaimsgroup.com/?l=linux-scsi&m=110971060502497&w=2
158*4882a593Smuzhiyun
159*4882a593Smuzhiyun	I attached a patch for your reference, too.
160*4882a593Smuzhiyun	Could you check and get this fix in your driver?
161*4882a593Smuzhiyun
162*4882a593Smuzhiyun	Best Regards,
163*4882a593Smuzhiyun	Jun'ichi Nomura
164*4882a593Smuzhiyun
165*4882a593SmuzhiyunRelease Date	: Fri Nov 11 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
166*4882a593SmuzhiyunCurrent Version : 2.20.4.7 (scsi module), 2.20.2.6 (cmm module)
167*4882a593SmuzhiyunOlder Version	: 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
168*4882a593Smuzhiyun
169*4882a593Smuzhiyun1.	Sorted out PCI IDs to remove megaraid support overlaps.
170*4882a593Smuzhiyun	Based on the patch from Daniel, sorted out PCI IDs along with
171*4882a593Smuzhiyun	character node name change from 'megadev' to 'megadev_legacy' to avoid
172*4882a593Smuzhiyun	conflict.
173*4882a593Smuzhiyun	---
174*4882a593Smuzhiyun	Hopefully we'll be getting the build restriction zapped much sooner,
175*4882a593Smuzhiyun	but we should also be thinking about totally removing the hardware
176*4882a593Smuzhiyun	support overlap in the megaraid drivers.
177*4882a593Smuzhiyun
178*4882a593Smuzhiyun	This patch pencils in a date of Feb 06 for this, and performs some
179*4882a593Smuzhiyun	printk abuse in hope that existing legacy users might pick up on what's
180*4882a593Smuzhiyun	going on.
181*4882a593Smuzhiyun
182*4882a593Smuzhiyun	Signed-off-by: Daniel Drake <dsd@gentoo.org>
183*4882a593Smuzhiyun	---
184*4882a593Smuzhiyun
185*4882a593Smuzhiyun2.	Fixed a issue: megaraid always fails to reset handler.
186*4882a593Smuzhiyun	---
187*4882a593Smuzhiyun	I found that the megaraid driver always fails to reset the
188*4882a593Smuzhiyun	adapter with the following message:
189*4882a593Smuzhiyun		megaraid: resetting the host...
190*4882a593Smuzhiyun		megaraid mbox: reset sequence completed successfully
191*4882a593Smuzhiyun		megaraid: fast sync command timed out
192*4882a593Smuzhiyun		megaraid: reservation reset failed
193*4882a593Smuzhiyun	when the "Cluster mode" of the adapter BIOS is enabled.
194*4882a593Smuzhiyun	So, whenever the reset occurs, the adapter goes to
195*4882a593Smuzhiyun	offline and just become unavailable.
196*4882a593Smuzhiyun
197*4882a593Smuzhiyun	Jun'ichi Nomura [mailto:jnomura@mtc.biglobe.ne.jp]
198*4882a593Smuzhiyun	---
199*4882a593Smuzhiyun
200*4882a593SmuzhiyunRelease Date	: Mon Mar 07 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
201*4882a593SmuzhiyunCurrent Version : 2.20.4.6 (scsi module), 2.20.2.6 (cmm module)
202*4882a593SmuzhiyunOlder Version	: 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
203*4882a593Smuzhiyun
204*4882a593Smuzhiyun1.	Added IOCTL backward compatibility.
205*4882a593Smuzhiyun	Convert megaraid_mm driver to new compat_ioctl entry points.
206*4882a593Smuzhiyun	I don't have easy access to hardware, so only compile tested.
207*4882a593Smuzhiyun		- Signed-off-by:Andi Kleen <ak@muc.de>
208*4882a593Smuzhiyun
209*4882a593Smuzhiyun2.	megaraid_mbox fix: wrong order of arguments in memset()
210*4882a593Smuzhiyun	That, BTW, shows why cross-builds are useful-the only indication of
211*4882a593Smuzhiyun	problem had been a new warning showing up in sparse output on alpha
212*4882a593Smuzhiyun	build (number of exceeding 256 got truncated).
213*4882a593Smuzhiyun		- Signed-off-by: Al Viro
214*4882a593Smuzhiyun		<viro@parcelfarce.linux.theplanet.co.uk>
215*4882a593Smuzhiyun
216*4882a593Smuzhiyun3.	Convert pci_module_init to pci_register_driver
217*4882a593Smuzhiyun	Convert from pci_module_init to pci_register_driver
218*4882a593Smuzhiyun	(from:http://kernelnewbies.org/KernelJanitors/TODO)
219*4882a593Smuzhiyun		- Signed-off-by: Domen Puncer <domen@coderock.org>
220*4882a593Smuzhiyun
221*4882a593Smuzhiyun4.	Use the pre defined DMA mask constants from dma-mapping.h
222*4882a593Smuzhiyun	Use the DMA_{64,32}BIT_MASK constants from dma-mapping.h when calling
223*4882a593Smuzhiyun	pci_set_dma_mask() or pci_set_consistend_dma_mask(). See
224*4882a593Smuzhiyun	http://marc.theaimsgroup.com/?t=108001993000001&r=1&w=2 for more
225*4882a593Smuzhiyun	details.
226*4882a593Smuzhiyun		Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch>
227*4882a593Smuzhiyun		Signed-off-by: Domen Puncer <domen@coderock.org>
228*4882a593Smuzhiyun
229*4882a593Smuzhiyun5.	Remove SSID checking for Dobson, Lindsay, and Verde based products.
230*4882a593Smuzhiyun	Checking the SSVID/SSID for controllers which have Dobson, Lindsay,
231*4882a593Smuzhiyun	and Verde is unnecessary because device ID has been assigned by LSI
232*4882a593Smuzhiyun	and it is unique value. So, all controllers with these IOPs have to be
233*4882a593Smuzhiyun	supported by the driver regardless SSVID/SSID.
234*4882a593Smuzhiyun
235*4882a593Smuzhiyun6.	Date Thu, 27 Jan 2005 04:31:09 +0100
236*4882a593Smuzhiyun	From Herbert Poetzl <>
237*4882a593Smuzhiyun	Subject RFC: assert_spin_locked() for 2.6
238*4882a593Smuzhiyun
239*4882a593Smuzhiyun	Greetings!
240*4882a593Smuzhiyun
241*4882a593Smuzhiyun	overcautious programming will kill your kernel ;)
242*4882a593Smuzhiyun	ever thought about checking a spin_lock or even
243*4882a593Smuzhiyun	asserting that it must be held (maybe just for
244*4882a593Smuzhiyun	spinlock debugging?) ...
245*4882a593Smuzhiyun
246*4882a593Smuzhiyun	there are several checks present in the kernel
247*4882a593Smuzhiyun	where somebody does a variation on the following:
248*4882a593Smuzhiyun
249*4882a593Smuzhiyun	  BUG_ON(!spin_is_locked(&some_lock));
250*4882a593Smuzhiyun
251*4882a593Smuzhiyun	so what's wrong about that? nothing, unless you
252*4882a593Smuzhiyun	compile the code with CONFIG_DEBUG_SPINLOCK but
253*4882a593Smuzhiyun	without CONFIG_SMP ... in which case the BUG()
254*4882a593Smuzhiyun	will kill your kernel ...
255*4882a593Smuzhiyun
256*4882a593Smuzhiyun	maybe it's not advised to make such assertions,
257*4882a593Smuzhiyun	but here is a solution which works for me ...
258*4882a593Smuzhiyun	(compile tested for sh, x86_64 and x86, boot/run
259*4882a593Smuzhiyun	tested for x86 only)
260*4882a593Smuzhiyun
261*4882a593Smuzhiyun	best,
262*4882a593Smuzhiyun	Herbert
263*4882a593Smuzhiyun
264*4882a593Smuzhiyun		- Herbert Poetzl <herbert@13thfloor.at>, Thu, 27 Jan 2005
265*4882a593Smuzhiyun
266*4882a593SmuzhiyunRelease Date	: Thu Feb 03 12:27:22 EST 2005 - Seokmann Ju <sju@lsil.com>
267*4882a593SmuzhiyunCurrent Version	: 2.20.4.5 (scsi module), 2.20.2.5 (cmm module)
268*4882a593SmuzhiyunOlder Version	: 2.20.4.4 (scsi module), 2.20.2.4 (cmm module)
269*4882a593Smuzhiyun
270*4882a593Smuzhiyun1.	Modified name of two attributes in scsi_host_template.
271*4882a593Smuzhiyun	On Wed, 2005-02-02 at 10:56 -0500, Ju, Seokmann wrote:
272*4882a593Smuzhiyun	> +	.sdev_attrs			= megaraid_device_attrs,
273*4882a593Smuzhiyun	> +	.shost_attrs			= megaraid_class_device_attrs,
274*4882a593Smuzhiyun
275*4882a593Smuzhiyun	These are, perhaps, slightly confusing names.
276*4882a593Smuzhiyun	The terms device and class_device have well defined meanings in the
277*4882a593Smuzhiyun	generic device model, neither of which is what you mean here.
278*4882a593Smuzhiyun	Why not simply megaraid_sdev_attrs and megaraid_shost_attrs?
279*4882a593Smuzhiyun
280*4882a593Smuzhiyun	Other than this, it looks fine to me too.
281*4882a593Smuzhiyun
282*4882a593SmuzhiyunRelease Date	: Thu Jan 27 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com>
283*4882a593SmuzhiyunCurrent Version	: 2.20.4.4 (scsi module), 2.20.2.5 (cmm module)
284*4882a593SmuzhiyunOlder Version	: 2.20.4.3 (scsi module), 2.20.2.4 (cmm module)
285*4882a593Smuzhiyun
286*4882a593Smuzhiyun1.	Bump up the version of scsi module due to its conflict.
287*4882a593Smuzhiyun
288*4882a593SmuzhiyunRelease Date	: Thu Jan 21 00:01:03 EST 2005 - Atul Mukker <atulm@lsil.com>
289*4882a593SmuzhiyunCurrent Version	: 2.20.4.3 (scsi module), 2.20.2.5 (cmm module)
290*4882a593SmuzhiyunOlder Version	: 2.20.4.2 (scsi module), 2.20.2.4 (cmm module)
291*4882a593Smuzhiyun
292*4882a593Smuzhiyun1.	Remove driver ioctl for logical drive to scsi address translation and
293*4882a593Smuzhiyun	replace with the sysfs attribute. To remove drives and change
294*4882a593Smuzhiyun	capacity, application shall now use the device attribute to get the
295*4882a593Smuzhiyun	logical drive number for a scsi device. For adding newly created
296*4882a593Smuzhiyun	logical drives, class device attribute would be required to uniquely
297*4882a593Smuzhiyun	identify each controller.
298*4882a593Smuzhiyun		- Atul Mukker <atulm@lsil.com>
299*4882a593Smuzhiyun
300*4882a593Smuzhiyun	"James, I've been thinking about this a little more, and you may be on
301*4882a593Smuzhiyun	to something here. Let each driver add files as such:"
302*4882a593Smuzhiyun
303*4882a593Smuzhiyun		- Matt Domsch <Matt_Domsch@dell.com>, 12.15.2004
304*4882a593Smuzhiyun		 linux-scsi mailing list
305*4882a593Smuzhiyun
306*4882a593Smuzhiyun
307*4882a593Smuzhiyun	"Then, if you simply publish your LD number as an extra parameter of
308*4882a593Smuzhiyun	the device, you can look through /sys to find it."
309*4882a593Smuzhiyun
310*4882a593Smuzhiyun		- James Bottomley <James.Bottomley@SteelEye.com>, 01.03.2005
311*4882a593Smuzhiyun		 linux-scsi mailing list
312*4882a593Smuzhiyun
313*4882a593Smuzhiyun
314*4882a593Smuzhiyun	"I don't see why not ... it's your driver, you can publish whatever
315*4882a593Smuzhiyun	extra information you need as scsi_device attributes; that was one of
316*4882a593Smuzhiyun	the designs of the extensible attribute system."
317*4882a593Smuzhiyun
318*4882a593Smuzhiyun		- James Bottomley <James.Bottomley@SteelEye.com>, 01.06.2005
319*4882a593Smuzhiyun		 linux-scsi mailing list
320*4882a593Smuzhiyun
321*4882a593Smuzhiyun2.	Add AMI megaraid support - Brian King <brking@charter.net>
322*4882a593Smuzhiyun		PCI_VENDOR_ID_AMI, PCI_DEVICE_ID_AMI_MEGARAID3,
323*4882a593Smuzhiyun		PCI_VENDOR_ID_AMI, PCI_SUBSYS_ID_PERC3_DC,
324*4882a593Smuzhiyun
325*4882a593Smuzhiyun3.	Make some code static - Adrian Bunk <bunk@stusta.de>
326*4882a593Smuzhiyun	Date:	Mon, 15 Nov 2004 03:14:57 +0100
327*4882a593Smuzhiyun
328*4882a593Smuzhiyun	The patch below makes some needlessly global code static.
329*4882a593Smuzhiyun	-wait_queue_head_t wait_q;
330*4882a593Smuzhiyun	+static wait_queue_head_t wait_q;
331*4882a593Smuzhiyun
332*4882a593Smuzhiyun	Signed-off-by: Adrian Bunk <bunk@stusta.de>
333*4882a593Smuzhiyun
334*4882a593Smuzhiyun4.	Added NEC ROMB support - NEC MegaRAID PCI Express ROMB controller
335*4882a593Smuzhiyun		PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_MEGARAID_NEC_ROMB_2E,
336*4882a593Smuzhiyun		PCI_SUBSYS_ID_NEC, PCI_SUBSYS_ID_MEGARAID_NEC_ROMB_2E,
337*4882a593Smuzhiyun
338*4882a593Smuzhiyun5.	Fixed Tape drive issue : For any Direct CDB command to physical device
339*4882a593Smuzhiyun	including tape, timeout value set by driver was 10 minutes. With this
340*4882a593Smuzhiyun	value, most of command will return within timeout. However, for those
341*4882a593Smuzhiyun	command like ERASE or FORMAT, it takes more than an hour depends on
342*4882a593Smuzhiyun	capacity of the device and the command could be terminated before it
343*4882a593Smuzhiyun	completes.
344*4882a593Smuzhiyun	To address this issue, the 'timeout' field in the DCDB command will
345*4882a593Smuzhiyun	have NO TIMEOUT (i.e., 4) value as its timeout on DCDB command.
346*4882a593Smuzhiyun
347*4882a593Smuzhiyun
348*4882a593Smuzhiyun
349*4882a593SmuzhiyunRelease Date	: Thu Dec  9 19:10:23 EST 2004
350*4882a593Smuzhiyun	- Sreenivas Bagalkote <sreenib@lsil.com>
351*4882a593Smuzhiyun
352*4882a593SmuzhiyunCurrent Version	: 2.20.4.2 (scsi module), 2.20.2.4 (cmm module)
353*4882a593SmuzhiyunOlder Version	: 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
354*4882a593Smuzhiyun
355*4882a593Smuzhiyuni.	Introduced driver ioctl that returns scsi address for a given ld.
356*4882a593Smuzhiyun
357*4882a593Smuzhiyun	"Why can't the existing sysfs interfaces be used to do this?"
358*4882a593Smuzhiyun		- Brian King (brking@us.ibm.com)
359*4882a593Smuzhiyun
360*4882a593Smuzhiyun	"I've looked into solving this another way, but I cannot see how
361*4882a593Smuzhiyun	to get this driver-private mapping of logical drive number-> HCTL
362*4882a593Smuzhiyun	without putting code something like this into the driver."
363*4882a593Smuzhiyun
364*4882a593Smuzhiyun	"...and by providing a mapping a function to userspace, the driver
365*4882a593Smuzhiyun	is free to change its mapping algorithm in the future if necessary .."
366*4882a593Smuzhiyun		- Matt Domsch (Matt_Domsch@dell.com)
367*4882a593Smuzhiyun
368*4882a593SmuzhiyunRelease Date	: Thu Dec  9 19:02:14 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
369*4882a593Smuzhiyun
370*4882a593SmuzhiyunCurrent Version	: 2.20.4.1 (scsi module), 2.20.2.3 (cmm module)
371*4882a593SmuzhiyunOlder Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
372*4882a593Smuzhiyun
373*4882a593Smuzhiyuni.	Fix a bug in kioc's dma buffer deallocation
374*4882a593Smuzhiyun
375*4882a593SmuzhiyunRelease Date	: Thu Nov  4 18:24:56 EST 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
376*4882a593Smuzhiyun
377*4882a593SmuzhiyunCurrent Version	: 2.20.4.1 (scsi module), 2.20.2.2 (cmm module)
378*4882a593SmuzhiyunOlder Version	: 2.20.4.0 (scsi module), 2.20.2.1 (cmm module)
379*4882a593Smuzhiyun
380*4882a593Smuzhiyuni.	Handle IOCTL cmd timeouts more properly.
381*4882a593Smuzhiyun
382*4882a593Smuzhiyunii.	pci_dma_sync_{sg,single}_for_cpu was introduced into megaraid_mbox
383*4882a593Smuzhiyun	incorrectly (instead of _for_device). Changed to appropriate
384*4882a593Smuzhiyun	pci_dma_sync_{sg,single}_for_device.
385*4882a593Smuzhiyun
386*4882a593SmuzhiyunRelease Date	: Wed Oct 06 11:15:29 EDT 2004 - Sreenivas Bagalkote <sreenib@lsil.com>
387*4882a593SmuzhiyunCurrent Version	: 2.20.4.0 (scsi module), 2.20.2.1 (cmm module)
388*4882a593SmuzhiyunOlder Version	: 2.20.4.0 (scsi module), 2.20.2.0 (cmm module)
389*4882a593Smuzhiyun
390*4882a593Smuzhiyuni.	Remove CONFIG_COMPAT around register_ioctl32_conversion
391*4882a593Smuzhiyun
392*4882a593SmuzhiyunRelease Date	: Mon Sep 27 22:15:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
393*4882a593SmuzhiyunCurrent Version	: 2.20.4.0 (scsi module), 2.20.2.0 (cmm module)
394*4882a593SmuzhiyunOlder Version	: 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
395*4882a593Smuzhiyun
396*4882a593Smuzhiyuni.	Fix data corruption. Because of a typo in the driver, the IO packets
397*4882a593Smuzhiyun	were wrongly shared by the ioctl path. This causes a whole IO command
398*4882a593Smuzhiyun	to be replaced by an incoming ioctl command.
399*4882a593Smuzhiyun
400*4882a593SmuzhiyunRelease Date	: Tue Aug 24 09:43:35 EDT 2004 - Atul Mukker <atulm@lsil.com>
401*4882a593SmuzhiyunCurrent Version	: 2.20.3.1 (scsi module), 2.20.2.0 (cmm module)
402*4882a593SmuzhiyunOlder Version	: 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
403*4882a593Smuzhiyun
404*4882a593Smuzhiyuni.	Function reordering so that inline functions are defined before they
405*4882a593Smuzhiyun	are actually used. It is now mandatory for GCC 3.4.1 (current stable)
406*4882a593Smuzhiyun
407*4882a593Smuzhiyun	Declare some heavy-weight functions to be non-inlined,
408*4882a593Smuzhiyun	megaraid_mbox_build_cmd, megaraid_mbox_runpendq,
409*4882a593Smuzhiyun	megaraid_mbox_prepare_pthru, megaraid_mbox_prepare_epthru,
410*4882a593Smuzhiyun	megaraid_busywait_mbox
411*4882a593Smuzhiyun
412*4882a593Smuzhiyun		- Andrew Morton, 08.19.2004
413*4882a593Smuzhiyun		linux-scsi mailing list
414*4882a593Smuzhiyun
415*4882a593Smuzhiyun	"Something else to clean up after inclusion: every instance of an
416*4882a593Smuzhiyun	inline function is actually rendered as a full function call, because
417*4882a593Smuzhiyun	the function is always used before it is defined.  Atul, please
418*4882a593Smuzhiyun	re-arrange the code to eliminate the need for most (all) of the
419*4882a593Smuzhiyun	function prototypes at the top of each file, and define (not just
420*4882a593Smuzhiyun	declare with a prototype) each inline function before its first use"
421*4882a593Smuzhiyun
422*4882a593Smuzhiyun		- Matt Domsch <Matt_Domsch@dell.com>, 07.27.2004
423*4882a593Smuzhiyun		linux-scsi mailing list
424*4882a593Smuzhiyun
425*4882a593Smuzhiyun
426*4882a593Smuzhiyunii.	Display elapsed time (countdown) while waiting for FW to boot.
427*4882a593Smuzhiyun
428*4882a593Smuzhiyuniii.	Module compilation reorder in Makefile so that unresolved symbols do
429*4882a593Smuzhiyun	not occur when driver is compiled non-modular.
430*4882a593Smuzhiyun
431*4882a593Smuzhiyun		Patrick J. LoPresti <patl@users.sourceforge.net>, 8.22.2004
432*4882a593Smuzhiyun		linux-scsi mailing list
433*4882a593Smuzhiyun
434*4882a593Smuzhiyun
435*4882a593SmuzhiyunRelease Date	: Thu Aug 19 09:58:33 EDT 2004 - Atul Mukker <atulm@lsil.com>
436*4882a593SmuzhiyunCurrent Version	: 2.20.3.0 (scsi module), 2.20.2.0 (cmm module)
437*4882a593SmuzhiyunOlder Version	: 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
438*4882a593Smuzhiyun
439*4882a593Smuzhiyuni.	When copying the mailbox packets, copy only first 14 bytes (for 32-bit
440*4882a593Smuzhiyun	mailboxes) and only first 22 bytes (for 64-bit mailboxes). This is to
441*4882a593Smuzhiyun	avoid getting the stale values for busy bit. We want to set the busy
442*4882a593Smuzhiyun	bit just before issuing command to the FW.
443*4882a593Smuzhiyun
444*4882a593Smuzhiyunii.	In the reset handling, if the reseted command is not owned by the
445*4882a593Smuzhiyun	driver, do not (wrongly) print information for the "attached" driver
446*4882a593Smuzhiyun	packet.
447*4882a593Smuzhiyun
448*4882a593Smuzhiyuniii.	Have extended wait when issuing command in synchronous mode. This is
449*4882a593Smuzhiyun	required for the cases where the option ROM is disabled and there is
450*4882a593Smuzhiyun	no BIOS to start the controller. The FW starts to boot after receiving
451*4882a593Smuzhiyun	the first command from the driver. The current driver has 1 second
452*4882a593Smuzhiyun	timeout for the synchronous commands, which is far less than what is
453*4882a593Smuzhiyun	actually required. We now wait up to MBOX_RESET_TIME (180 seconds) for
454*4882a593Smuzhiyun	FW boot process.
455*4882a593Smuzhiyun
456*4882a593Smuzhiyuniv.	In megaraid_mbox_product_info, clear the mailbox contents completely
457*4882a593Smuzhiyun	before preparing the command for inquiry3. This is to ensure that the
458*4882a593Smuzhiyun	FW does not get junk values in the command.
459*4882a593Smuzhiyun
460*4882a593Smuzhiyunv.	Do away with the redundant LSI_CONFIG_COMPAT redefinition for
461*4882a593Smuzhiyun	CONFIG_COMPAT. Replace <asm/ioctl32.h> with <linux/ioctl32.h>
462*4882a593Smuzhiyun
463*4882a593Smuzhiyun		- James Bottomley <James.Bottomley@SteelEye.com>, 08.17.2004
464*4882a593Smuzhiyun		 linux-scsi mailing list
465*4882a593Smuzhiyun
466*4882a593Smuzhiyunvi.	Add support for 64-bit applications. Current drivers assume only
467*4882a593Smuzhiyun	32-bit applications, even on 64-bit platforms. Use the "data" and
468*4882a593Smuzhiyun	"buffer" fields of the mimd_t structure, instead of embedded 32-bit
469*4882a593Smuzhiyun	addresses in application mailbox and passthru structures.
470*4882a593Smuzhiyun
471*4882a593Smuzhiyunvii.	Move the function declarations for the management module from
472*4882a593Smuzhiyun	megaraid_mm.h to megaraid_mm.c
473*4882a593Smuzhiyun
474*4882a593Smuzhiyun		- Andrew Morton, 08.19.2004
475*4882a593Smuzhiyun		linux-scsi mailing list
476*4882a593Smuzhiyun
477*4882a593Smuzhiyunviii.	Change default values for MEGARAID_NEWGEN, MEGARAID_MM, and
478*4882a593Smuzhiyun	MEGARAID_MAILBOX to 'n' in Kconfig.megaraid
479*4882a593Smuzhiyun
480*4882a593Smuzhiyun		- Andrew Morton, 08.19.2004
481*4882a593Smuzhiyun		linux-scsi mailing list
482*4882a593Smuzhiyun
483*4882a593Smuzhiyunix.	replace udelay with msleep
484*4882a593Smuzhiyun
485*4882a593Smuzhiyunx.	Typos corrected in comments and whitespace adjustments, explicit
486*4882a593Smuzhiyun	grouping of expressions.
487*4882a593Smuzhiyun
488*4882a593Smuzhiyun
489*4882a593SmuzhiyunRelease Date	: Fri Jul 23 15:22:07 EDT 2004 - Atul Mukker <atulm@lsil.com>
490*4882a593SmuzhiyunCurrent Version	: 2.20.2.0 (scsi module), 2.20.1.0 (cmm module)
491*4882a593SmuzhiyunOlder Version	: 2.20.1.0 (scsi module), 2.20.0.0 (cmm module)
492*4882a593Smuzhiyun
493*4882a593Smuzhiyuni.	Add PCI ids for Acer ROMB 2E solution
494*4882a593Smuzhiyun
495*4882a593Smuzhiyunii.	Add PCI ids for I4
496*4882a593Smuzhiyun
497*4882a593Smuzhiyuniii.	Typo corrected for subsys id for megaraid sata 300-4x
498*4882a593Smuzhiyun
499*4882a593Smuzhiyuniv.	Remove yield() while mailbox handshake in synchronous commands
500*4882a593Smuzhiyun
501*4882a593Smuzhiyun
502*4882a593Smuzhiyun	"My other main gripe is things like this:
503*4882a593Smuzhiyun
504*4882a593Smuzhiyun	+	// wait for maximum 1 second for status to post
505*4882a593Smuzhiyun	+	for (i = 0; i < 40000; i++) {
506*4882a593Smuzhiyun	+		if (mbox->numstatus != 0xFF) break;
507*4882a593Smuzhiyun	+		udelay(25); yield();
508*4882a593Smuzhiyun	+	}
509*4882a593Smuzhiyun
510*4882a593Smuzhiyun	which litter the driver.  Use of yield() in drivers is deprecated."
511*4882a593Smuzhiyun
512*4882a593Smuzhiyun		- James Bottomley <James.Bottomley@SteelEye.com>, 07.14.2004
513*4882a593Smuzhiyun		 linux-scsi mailing list
514*4882a593Smuzhiyun
515*4882a593Smuzhiyunv.	Remove redundant __megaraid_busywait_mbox routine
516*4882a593Smuzhiyun
517*4882a593Smuzhiyunvi.	Fix bug in the management module, which causes a system lockup when the
518*4882a593Smuzhiyun	IO module is loaded and then unloaded, followed by executing any
519*4882a593Smuzhiyun	management utility. The current version of management module does not
520*4882a593Smuzhiyun	handle the adapter unregister properly.
521*4882a593Smuzhiyun
522*4882a593Smuzhiyun	Specifically, it still keeps a reference to the unregistered
523*4882a593Smuzhiyun	controllers. To avoid this, the static array adapters has been
524*4882a593Smuzhiyun	replaced by a dynamic list, which gets updated every time an adapter
525*4882a593Smuzhiyun	is added or removed.
526*4882a593Smuzhiyun
527*4882a593Smuzhiyun	Also, during unregistration of the IO module, the resources are
528*4882a593Smuzhiyun	now released in the exact reverse order of the allocation time
529*4882a593Smuzhiyun	sequence.
530*4882a593Smuzhiyun
531*4882a593Smuzhiyun
532*4882a593SmuzhiyunRelease Date	: Fri Jun 25 18:58:43 EDT 2004 - Atul Mukker <atulm@lsil.com>
533*4882a593SmuzhiyunCurrent Version	: 2.20.1.0
534*4882a593SmuzhiyunOlder Version	: megaraid 2.20.0.1
535*4882a593Smuzhiyun
536*4882a593Smuzhiyuni.	Stale list pointer in adapter causes kernel panic when module
537*4882a593Smuzhiyun	megaraid_mbox is unloaded
538*4882a593Smuzhiyun
539*4882a593Smuzhiyun
540*4882a593SmuzhiyunRelease Date	: Thu Jun 24 20:37:11 EDT 2004 - Atul Mukker <atulm@lsil.com>
541*4882a593SmuzhiyunCurrent Version	: 2.20.0.1
542*4882a593SmuzhiyunOlder Version	: megaraid 2.20.0.00
543*4882a593Smuzhiyun
544*4882a593Smuzhiyuni.	Modules are not 'y' by default, but depend on current definition of
545*4882a593Smuzhiyun	SCSI & PCI.
546*4882a593Smuzhiyun
547*4882a593Smuzhiyunii.	Redundant structure mraid_driver_t removed.
548*4882a593Smuzhiyun
549*4882a593Smuzhiyuniii.	Miscellaneous indentation and goto/label fixes.
550*4882a593Smuzhiyun		- Christoph Hellwig <hch@infradead.org>, 06.24.2004 linux-scsi
551*4882a593Smuzhiyun
552*4882a593Smuzhiyuniv.	scsi_host_put(), do just before completing HBA shutdown.
553*4882a593Smuzhiyun
554*4882a593Smuzhiyun
555*4882a593Smuzhiyun
556*4882a593SmuzhiyunRelease Date	: Mon Jun 21 19:53:54 EDT 2004 - Atul Mukker <atulm@lsil.com>
557*4882a593SmuzhiyunCurrent Version	: 2.20.0.0
558*4882a593SmuzhiyunOlder Version	: megaraid 2.20.0.rc2 and 2.00.3
559*4882a593Smuzhiyun
560*4882a593Smuzhiyuni.	Independent module to interact with userland applications and
561*4882a593Smuzhiyun	multiplex command to low level RAID module(s).
562*4882a593Smuzhiyun
563*4882a593Smuzhiyun	"Shared code in a third module, a "library module", is an acceptable
564*4882a593Smuzhiyun	solution. modprobe automatically loads dependent modules, so users
565*4882a593Smuzhiyun	running "modprobe driver1" or "modprobe driver2" would automatically
566*4882a593Smuzhiyun	load the shared library module."
567*4882a593Smuzhiyun
568*4882a593Smuzhiyun		- Jeff Garzik <jgarzik@pobox.com> 02.25.2004 LKML
569*4882a593Smuzhiyun
570*4882a593Smuzhiyun	"As Jeff hinted, if your userspace<->driver API is consistent between
571*4882a593Smuzhiyun	your new MPT-based RAID controllers and your existing megaraid driver,
572*4882a593Smuzhiyun	then perhaps you need a single small helper module (lsiioctl or some
573*4882a593Smuzhiyun	better name), loaded by both mptraid and megaraid automatically, which
574*4882a593Smuzhiyun	handles registering the /dev/megaraid node dynamically. In this case,
575*4882a593Smuzhiyun	both mptraid and megaraid would register with lsiioctl for each
576*4882a593Smuzhiyun	adapter discovered, and lsiioctl would essentially be a switch,
577*4882a593Smuzhiyun	redirecting userspace tool ioctls to the appropriate driver."
578*4882a593Smuzhiyun
579*4882a593Smuzhiyun		- Matt Domsch <Matt_Domsch@dell.com> 02.25.2004 LKML
580*4882a593Smuzhiyun
581*4882a593Smuzhiyunii.	Remove C99 initializations from pci_device id.
582*4882a593Smuzhiyun
583*4882a593Smuzhiyun	"pci_id_table_g would be much more readable when not using C99
584*4882a593Smuzhiyun	initializers.
585*4882a593Smuzhiyun	PCI table doesn't change, there's lots of users that prefer the more
586*4882a593Smuzhiyun	readable variant.  And it's really far less and much easier to grok
587*4882a593Smuzhiyun	lines without C99 initializers."
588*4882a593Smuzhiyun
589*4882a593Smuzhiyun		- Christoph Hellwig <hch@infradead.org>, 05.28.2004 linux-scsi
590*4882a593Smuzhiyun
591*4882a593Smuzhiyuniii.	Many fixes as suggested by Christoph Hellwig <hch@infradead.org> on
592*4882a593Smuzhiyun	linux-scsi, 05.28.2004
593*4882a593Smuzhiyun
594*4882a593Smuzhiyuniv.	We now support up to 32 parallel ioctl commands instead of current 1.
595*4882a593Smuzhiyun	There is a conscious effort to let memory allocation not fail for ioctl
596*4882a593Smuzhiyun	commands.
597*4882a593Smuzhiyun
598*4882a593Smuzhiyunv.	Do away with internal memory management. Use pci_pool_(create|alloc)
599*4882a593Smuzhiyun	instead.
600*4882a593Smuzhiyun
601*4882a593Smuzhiyunvi.	Kill tasklet when unloading the driver.
602*4882a593Smuzhiyun
603*4882a593Smuzhiyunvii.	Do not use "host_lock', driver has fine-grain locks now to protect all
604*4882a593Smuzhiyun	data structures.
605*4882a593Smuzhiyun
606*4882a593Smuzhiyunviii.	Optimize the build scatter-gather list routine. The callers already
607*4882a593Smuzhiyun	know the data transfer address and length.
608*4882a593Smuzhiyun
609*4882a593Smuzhiyunix.	Better implementation of error handling and recovery. Driver now
610*4882a593Smuzhiyun	performs extended errors recovery for instances like scsi cable pull.
611*4882a593Smuzhiyun
612*4882a593Smuzhiyunx.	Disassociate the management commands with an overlaid scsi command.
613*4882a593Smuzhiyun	Driver now treats the management packets as special packets and has a
614*4882a593Smuzhiyun	dedicated callback routine.
615