All of lore.kernel.org
 help / color / mirror / Atom feed
* PATCH:
@ 2007-04-28 21:47 Mark Lord
  2007-04-28 21:48 ` PATCH: libata: add support for ATA_16 on ATAPI Mark Lord
  0 siblings, 1 reply; 15+ messages in thread
From: Mark Lord @ 2007-04-28 21:47 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Tejun Heo, Alan Cox, IDE/ATA development list

(resending..)

This patch adds support for issuing ATA_16 passthru commands
to ATAPI devices managed by libata.  It requires the previous
CDB length fix patch.

A boot/module parameter, "ata16_passthru=1" can be used to
globally disable this feature, if ever desired.

Signed-Off-By: Mark Lord <mlord@pobox.com>
---
diff -u --recursive --new-file --exclude-from=old/Documentation/dontdiff old/drivers/ata/libata-core.c new/drivers/ata/libata-core.c
--- old/drivers/ata/libata-core.c	2007-02-02 12:29:10.000000000 -0500
+++ new/drivers/ata/libata-core.c	2007-02-02 12:29:03.000000000 -0500
@@ -82,6 +82,10 @@
 module_param(atapi_dmadir, int, 0444);
 MODULE_PARM_DESC(atapi_dmadir, "Enable ATAPI DMADIR bridge support (0=off, 1=on)");
 
+int ata16_passthru = 0;
+module_param(ata16_passthru, int, 0444);
+MODULE_PARM_DESC(ata16_passthru, "Enable passthru of SCSI opcode 0x85 to ATAPI devices (0=off, 1=on)");
+
 int libata_fua = 0;
 module_param_named(fua, libata_fua, int, 0444);
 MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)");
diff -u --recursive --new-file --exclude-from=old/Documentation/dontdiff old/drivers/ata/libata-scsi.c new/drivers/ata/libata-scsi.c
--- old/drivers/ata/libata-scsi.c	2007-02-02 12:29:10.000000000 -0500
+++ new/drivers/ata/libata-scsi.c	2007-02-02 12:29:25.000000000 -0500
@@ -2688,6 +2688,10 @@
 
 static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd)
 {
+	if (dev->class == ATA_DEV_ATAPI)
+		if (cmd != ATA_16 || ata16_passthru)
+			return atapi_xlat;
+
 	switch (cmd) {
 	case READ_6:
 	case READ_10:
@@ -2746,27 +2750,28 @@
 				      void (*done)(struct scsi_cmnd *),
 				      struct ata_device *dev)
 {
-	int rc = 0;
-
-	if (unlikely(!scmd->cmd_len || scmd->cmd_len > dev->cdb_len)) {
-		DPRINTK("bad CDB len=%u, max=%u\n",
-			scmd->cmd_len, dev->cdb_len);
+	ata_xlat_func_t xlat_func;
+	int rc = 0, max_len;
+	u8 scsi_op = scmd->cmnd[0];
+
+	if (scsi_op == ATA_16 && dev->class == ATA_DEV_ATAPI && !ata16_passthru)
+		max_len = 16;
+	else
+		max_len = dev->cdb_len;
+ 
+	if (unlikely(!scmd->cmd_len || scmd->cmd_len > max_len)) {
+		DPRINTK("bad CDB len=%u, max=%u\n",
+			scmd->cmd_len, max_len);
 		scmd->result = DID_ERROR << 16;
 		done(scmd);
 		return 0;
 	}
 
-	if (dev->class == ATA_DEV_ATA) {
-		ata_xlat_func_t xlat_func = ata_get_xlat_func(dev,
-							      scmd->cmnd[0]);
-
-		if (xlat_func)
-			rc = ata_scsi_translate(dev, scmd, done, xlat_func);
-		else
-			ata_scsi_simulate(dev, scmd, done);
-	} else
-		rc = ata_scsi_translate(dev, scmd, done, atapi_xlat);
-
+	xlat_func = ata_get_xlat_func(dev, scsi_op);
+	if (xlat_func)
+		rc = ata_scsi_translate(dev, scmd, done, xlat_func);
+	else
+		ata_scsi_simulate(dev, scmd, done);
 	return rc;
 }
 
diff -u --recursive --new-file --exclude-from=old/Documentation/dontdiff old/drivers/ata/libata.h new/drivers/ata/libata.h
--- old/drivers/ata/libata.h	2007-02-02 12:26:28.000000000 -0500
+++ new/drivers/ata/libata.h	2007-02-02 12:29:03.000000000 -0500
@@ -47,6 +47,7 @@
 extern struct workqueue_struct *ata_aux_wq;
 extern int atapi_enabled;
 extern int atapi_dmadir;
+extern int ata16_passthru;
 extern int libata_fua;
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
 extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,

^ permalink raw reply	[flat|nested] 15+ messages in thread

* PATCH: libata: add support for ATA_16 on ATAPI
  2007-04-28 21:47 PATCH: Mark Lord
@ 2007-04-28 21:48 ` Mark Lord
  2007-04-29  7:46   ` Tejun Heo
  0 siblings, 1 reply; 15+ messages in thread
From: Mark Lord @ 2007-04-28 21:48 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Tejun Heo, Alan Cox, IDE/ATA development list

resending.. again.. with a Subject line this time :)

This patch adds support for issuing ATA_16 passthru commands
to ATAPI devices managed by libata.  It requires the previous
CDB length fix patch.

A boot/module parameter, "ata16_passthru=1" can be used to
globally disable this feature, if ever desired.

Signed-Off-By: Mark Lord <mlord@pobox.com>
--- 
diff -u --recursive --new-file --exclude-from=old/Documentation/dontdiff old/drivers/ata/libata-core.c new/drivers/ata/libata-core.c
--- old/drivers/ata/libata-core.c	2007-02-02 12:29:10.000000000 -0500
+++ new/drivers/ata/libata-core.c	2007-02-02 12:29:03.000000000 -0500
@@ -82,6 +82,10 @@
 module_param(atapi_dmadir, int, 0444);
 MODULE_PARM_DESC(atapi_dmadir, "Enable ATAPI DMADIR bridge support (0=off, 1=on)");
 
+int ata16_passthru = 0;
+module_param(ata16_passthru, int, 0444);
+MODULE_PARM_DESC(ata16_passthru, "Enable passthru of SCSI opcode 0x85 to ATAPI devices (0=off, 1=on)");
+
 int libata_fua = 0;
 module_param_named(fua, libata_fua, int, 0444);
 MODULE_PARM_DESC(fua, "FUA support (0=off, 1=on)");
diff -u --recursive --new-file --exclude-from=old/Documentation/dontdiff old/drivers/ata/libata-scsi.c new/drivers/ata/libata-scsi.c
--- old/drivers/ata/libata-scsi.c	2007-02-02 12:29:10.000000000 -0500
+++ new/drivers/ata/libata-scsi.c	2007-02-02 12:29:25.000000000 -0500
@@ -2688,6 +2688,10 @@
 
 static inline ata_xlat_func_t ata_get_xlat_func(struct ata_device *dev, u8 cmd)
 {
+	if (dev->class == ATA_DEV_ATAPI)
+		if (cmd != ATA_16 || ata16_passthru)
+			return atapi_xlat;
+
 	switch (cmd) {
 	case READ_6:
 	case READ_10:
@@ -2746,27 +2750,28 @@
 				      void (*done)(struct scsi_cmnd *),
 				      struct ata_device *dev)
 {
-	int rc = 0;
-
-	if (unlikely(!scmd->cmd_len || scmd->cmd_len > dev->cdb_len)) {
-		DPRINTK("bad CDB len=%u, max=%u\n",
-			scmd->cmd_len, dev->cdb_len);
+	ata_xlat_func_t xlat_func;
+	int rc = 0, max_len;
+	u8 scsi_op = scmd->cmnd[0];
+
+	if (scsi_op == ATA_16 && dev->class == ATA_DEV_ATAPI && !ata16_passthru)
+		max_len = 16;
+	else
+		max_len = dev->cdb_len;
+ 
+	if (unlikely(!scmd->cmd_len || scmd->cmd_len > max_len)) {
+		DPRINTK("bad CDB len=%u, max=%u\n",
+			scmd->cmd_len, max_len);
 		scmd->result = DID_ERROR << 16;
 		done(scmd);
 		return 0;
 	}
 
-	if (dev->class == ATA_DEV_ATA) {
-		ata_xlat_func_t xlat_func = ata_get_xlat_func(dev,
-							      scmd->cmnd[0]);
-
-		if (xlat_func)
-			rc = ata_scsi_translate(dev, scmd, done, xlat_func);
-		else
-			ata_scsi_simulate(dev, scmd, done);
-	} else
-		rc = ata_scsi_translate(dev, scmd, done, atapi_xlat);
-
+	xlat_func = ata_get_xlat_func(dev, scsi_op);
+	if (xlat_func)
+		rc = ata_scsi_translate(dev, scmd, done, xlat_func);
+	else
+		ata_scsi_simulate(dev, scmd, done);
 	return rc;
 }
 
diff -u --recursive --new-file --exclude-from=old/Documentation/dontdiff old/drivers/ata/libata.h new/drivers/ata/libata.h
--- old/drivers/ata/libata.h	2007-02-02 12:26:28.000000000 -0500
+++ new/drivers/ata/libata.h	2007-02-02 12:29:03.000000000 -0500
@@ -47,6 +47,7 @@
 extern struct workqueue_struct *ata_aux_wq;
 extern int atapi_enabled;
 extern int atapi_dmadir;
+extern int ata16_passthru;
 extern int libata_fua;
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_device *dev);
 extern int ata_build_rw_tf(struct ata_taskfile *tf, struct ata_device *dev,

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: PATCH: libata: add support for ATA_16 on ATAPI
  2007-04-28 21:48 ` PATCH: libata: add support for ATA_16 on ATAPI Mark Lord
@ 2007-04-29  7:46   ` Tejun Heo
  0 siblings, 0 replies; 15+ messages in thread
From: Tejun Heo @ 2007-04-29  7:46 UTC (permalink / raw)
  To: Mark Lord; +Cc: Jeff Garzik, Alan Cox, IDE/ATA development list

Mark Lord wrote:
> resending.. again.. with a Subject line this time :)
> 
> This patch adds support for issuing ATA_16 passthru commands
> to ATAPI devices managed by libata.  It requires the previous
> CDB length fix patch.
> 
> A boot/module parameter, "ata16_passthru=1" can be used to
> globally disable this feature, if ever desired.
> 
> Signed-Off-By: Mark Lord <mlord@pobox.com>

Acked-by: Tejun Heo <htejun@gmail.com>

-- 
tejun

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch,
  2004-11-21 23:58 Patch, Andreas Fenkart
@ 2004-11-22  6:37 ` Jaroslav Kysela
  0 siblings, 0 replies; 15+ messages in thread
From: Jaroslav Kysela @ 2004-11-22  6:37 UTC (permalink / raw)
  To: Andreas Fenkart; +Cc: alsa-devel

On Mon, 22 Nov 2004, Andreas Fenkart wrote:

> Hi list
> 
> My gnomemeeting hung when accessing the microphone.
> The problem was that the rate variable was not initialized when jumping to
> the __partial label.

Oops. Thanks. Applied to CVS.
						Jaroslav

-----
Jaroslav Kysela <perex@suse.cz>
Linux Kernel Sound Maintainer
ALSA Project, SUSE Labs


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Patch,
@ 2004-11-21 23:58 Andreas Fenkart
  2004-11-22  6:37 ` Patch, Jaroslav Kysela
  0 siblings, 1 reply; 15+ messages in thread
From: Andreas Fenkart @ 2004-11-21 23:58 UTC (permalink / raw)
  To: alsa-devel

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain; charset="us-ascii", Size: 308 bytes --]

Hi list

My gnomemeeting hung when accessing the microphone.
The problem was that the rate variable was not initialized when jumping to
the __partial label.

Greetings

Andreas

-- 
NEU +++ DSL Komplett von GMX +++ http://www.gmx.net/de/go/dsl
GMX DSL-Netzanschluss + Tarif zum supergünstigen Komplett-Preis!

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: grab_period.patch --]
[-- Type: text/x-patch; name="grab_period.patch", Size: 361 bytes --]

--- alsa-lib-1.0.6/src/pcm/pcm_rate.c	2004-08-09 08:31:41.000000000 +0200
+++ /mnt/ice/src/alsa-lib-1.0.6/src/pcm/pcm_rate.c	2004-11-22 02:53:13.000000000 +0100
@@ -1082,7 +1082,6 @@ static int snd_pcm_rate_grab_next_period
 			return 0;
 		}
 	} else {
-		snd_pcm_rate_t *rate = pcm->private_data;
 		snd_pcm_uframes_t xfer;
 
 		/* ok, grab first fragment */

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-04 20:47                     ` Nicolas Pouillon
@ 2004-10-04 21:04                       ` Thomas Gleixner
  0 siblings, 0 replies; 15+ messages in thread
From: Thomas Gleixner @ 2004-10-04 21:04 UTC (permalink / raw)
  To: Nicolas Pouillon; +Cc: linux-mtd

On Mon, 2004-10-04 at 22:47, Nicolas Pouillon wrote:
> > The configuration register reflects the state of the IF_CFG pin.
> 
> I assume this is an hardware configuration.
> Would it be possible to change 16bit access to 32bit in MTD chip while
> running?

RTFM !!!!

Configuration  Register
Type: Read/Write (except bit 7, which is Read Only)
7 IF_CFG (Interface Configuration). Reflects the state of the IF_CFG
input pin.

That's a bit to read what the hardware is configured for. I doubt that
there is a possibility to reconfigure the PCB by software. :)

> I tried to reconfigure PXA bank mode to 32 bit mode: probing no more
> works, and mmio transfers dont crash any more...

That's really surprising that it works no more.

> So if I understood well, PXA just makes kernel crash if accessing a
> 16bit mapped zone with 32bits words (quite normal, in fact, but not
> straightforward for me as I'm learning at the same time ;)

This is either a configuration problem or a bug/feature of the MTD code.
Which driver / part of the MTD framework is the source of this problem ?

> As I saw different bug reports/issues on MLs with this kind of thing
> (PXA kernel crashing while probing mtd), shouldn't a #warning, or a
> printk just before probing annoucing the issue could be added ?

He ? An Oops or a BUG are warning enough, that something is going wrong.
If we put for everything what can go wrong a warning into the kernel
then the majority of the kernel source will be printk and string
constants instead of functional code.

tglx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-04 17:59                   ` Thomas Gleixner
@ 2004-10-04 20:47                     ` Nicolas Pouillon
  2004-10-04 21:04                       ` Thomas Gleixner
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Pouillon @ 2004-10-04 20:47 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

[Mon, 04 Oct 2004 19:59:11 +0200]
Thomas Gleixner <tglx@linutronix.de> eut le bonheur d'écrire:

> The configuration register reflects the state of the IF_CFG pin.

I assume this is an hardware configuration.
Would it be possible to change 16bit access to 32bit in MTD chip while
running?

I tried to reconfigure PXA bank mode to 32 bit mode: probing no more
works, and mmio transfers dont crash any more...
So if I understood well, PXA just makes kernel crash if accessing a
16bit mapped zone with 32bits words (quite normal, in fact, but not
straightforward for me as I'm learning at the same time ;)

As I saw different bug reports/issues on MLs with this kind of thing
(PXA kernel crashing while probing mtd), shouldn't a #warning, or a
printk just before probing annoucing the issue could be added ?

Cheers !

-- 
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-04 16:38                 ` Nicolas Pouillon
@ 2004-10-04 17:59                   ` Thomas Gleixner
  2004-10-04 20:47                     ` Nicolas Pouillon
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Gleixner @ 2004-10-04 17:59 UTC (permalink / raw)
  To: Nicolas Pouillon; +Cc: linux-mtd

On Mon, 2004-10-04 at 18:38, Nicolas Pouillon wrote:
> > Is the chip configured for 16-bit interface mode ? 
> 
> PXA boots of it and its BOOT_SEL is configured to "Asynchronous 16bit
> ROM", elsewhere, in mem controller, it is configured as "16bit fast
> flash or rom, non burst read". so I assume it is.
> 
> > If yes, there are more tweaks neccecary.
> 
> I can see some NAND_BUSWIDTH_16 options, but how can this be enabled at
> probe time ?

The configuration register reflects the state of the IF_CFG pin.
The NAND_BUSWIDTH_16 option must be set before calling nand_scan, but
AFAICS you must also add 16bit aware read/write... functions for 
doc2001plus.

tglx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-04  8:05               ` Thomas Gleixner
@ 2004-10-04 16:38                 ` Nicolas Pouillon
  2004-10-04 17:59                   ` Thomas Gleixner
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Pouillon @ 2004-10-04 16:38 UTC (permalink / raw)
  Cc: linux-mtd

[Mon, 04 Oct 2004 10:05:11 +0200]
Thomas Gleixner <tglx@linutronix.de> eut le bonheur d'écrire:

> If you can start something like a kernel or a repairtool via JTAG you
> should have access.

Hm, sould document more on JTAG ;)

> > > #define. The code runs on 2.4 too. See compatmac.h
> > 
> > I'll have a look at it ;)

Ok, it does compile.
I still have problems like oops when accessing MTD (same than before).
error is "Unhandled fault: imprecise external abort (0xcf6) at
0x20800014", which seems a blur.
I cant understand why Xscale complains, but I saw this issue has been
addressed some times on arm-linux ML, without fix (at least not in same
threads)

> Is the chip configured for 16-bit interface mode ? 

PXA boots of it and its BOOT_SEL is configured to "Asynchronous 16bit
ROM", elsewhere, in mem controller, it is configured as "16bit fast
flash or rom, non burst read". so I assume it is.

> If yes, there are more tweaks neccecary.

I can see some NAND_BUSWIDTH_16 options, but how can this be enabled at
probe time ?

-- 
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-03 20:18             ` Nicolas Pouillon
@ 2004-10-04  8:05               ` Thomas Gleixner
  2004-10-04 16:38                 ` Nicolas Pouillon
  0 siblings, 1 reply; 15+ messages in thread
From: Thomas Gleixner @ 2004-10-04  8:05 UTC (permalink / raw)
  To: Nicolas Pouillon; +Cc: linux-mtd

On Sun, 2004-10-03 at 22:18, Nicolas Pouillon wrote:
> Unless... Is there some means to access DoC through JTAG ?
> I've seens some pages saying it works, but I'm not too sure it actually
> was speaking of the case I have : A PXA and a M-Sys DoC.

If you can start something like a kernel or a repairtool via JTAG you
should have access.

> > The new code supports the usage of NAND aware
> > filesystems like JFFS2 too. So you don't even need the INFTL stuff, if
> > you must not provide compability with the M-Sys stuff.
> 
> Mh, what is "compatibility with M-Sys stuff" ?

The M-Sys INFTL format.

> > The MTD CVS patch (use patches/patchin.sh) should work with 2.6.7.
> > Hmm, the __iomem related changes are not in 2.6.7. Thats just a simple
> > #define. The code runs on 2.4 too. See compatmac.h
> 
> I'll have a look at it ;)

I really recommend you to use the new code, so ppl. which have such
devices around can help you.

> > > 
> > That's the only one I found on the M-Sys webpage which has a similar
> > type code.
> 
> This is it. Is chip ID 0xa5 ?

Of course not. It's 0x75 :)

Maybe that helps:

> *Interestingly* I got a5ec as the ID for my chip, but this was an 
> incorrect ID.
> the reason I got it was that on the toshiba controller I used, accessing 
> the data register bytewise read every *other* byte, returning ec and 
> garbage (which was  a5 always).
> Using a word access worked as expected and I got the correct id, 75 ec

Is the chip configured for 16-bit interface mode ? 
If yes, there are more tweaks neccecary.

tglx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
       [not found]           ` <1096768161.21297.129.camel@thomas>
@ 2004-10-03 20:18             ` Nicolas Pouillon
  2004-10-04  8:05               ` Thomas Gleixner
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Pouillon @ 2004-10-03 20:18 UTC (permalink / raw)
  To: tglx; +Cc: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1879 bytes --]

[Sun, 03 Oct 2004 03:49:21 +0200]
Thomas Gleixner <tglx@linutronix.de> eut le bonheur d'écrire:

>  It's quite stable now. The experimental will go away soon.

;)

> I see. But you will not be able to use the chip really, as the code in
> mtd/devices and the old inftl driver are missing functionality (e.g.
> write support).

Short term I dont care about write support, as I wont have two chances
to rewrite the DoC, if I screw things up, the only thing I will be able
to do is get the device back to service (and they wont want to repair
it, I opened it...)

Unless... Is there some means to access DoC through JTAG ?
I've seens some pages saying it works, but I'm not too sure it actually
was speaking of the case I have : A PXA and a M-Sys DoC.

> The new code supports the usage of NAND aware
> filesystems like JFFS2 too. So you don't even need the INFTL stuff, if
> you must not provide compability with the M-Sys stuff.

Mh, what is "compatibility with M-Sys stuff" ?

> The MTD CVS patch (use patches/patchin.sh) should work with 2.6.7.
> Hmm, the __iomem related changes are not in 2.6.7. Thats just a simple
> #define. The code runs on 2.4 too. See compatmac.h

I'll have a look at it ;)

> > Things I can read on the chip (hoping i'm correct, it is not very
> > readable) are:
> > "M-Systems
> > Disc-on-chip
> > MD333-D64-V3-X
> > Japan 033-----" (dunno what's under "----")
> 
> MD3331-D64-V3-T 64MB/512Mb FBGA 3.3V

64MB, 3.3V, BGA, yes ;)
Picture here, to confirm (I actually forgot the 1 after "333"):
http://a620.zwischenstand.de/Photos/DoC/dscn2499.jpg
(photos I have without the sticker are bad)

> That's the only one I found on the M-Sys webpage which has a similar
> type code.

This is it. Is chip ID 0xa5 ?

Cheers !

-- 
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-02 20:42       ` Thomas Gleixner
@ 2004-10-03  1:11         ` Nicolas Pouillon
       [not found]         ` <20041003030653.2e0452a7.nipo@ssji.net>
  1 sibling, 0 replies; 15+ messages in thread
From: Nicolas Pouillon @ 2004-10-03  1:11 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 1766 bytes --]

[Sat, 02 Oct 2004 22:42:09 +0200]
Thomas Gleixner <tglx@linutronix.de> eut le bonheur d'écrire:

> You should have tried 2.6.8.1 !!

I have.
2.6.8.1 kernel from hh.org just crashes on my device, (MTD in or not),
and I have no time to investigate this issue, so I keep to 2.6.7 (no
interesting changes in 2.6.8.1 to me anyway)

> Did you notice the DEPRECATED NOTE in Kconfig ????
[..]
> "Please use the new diskonchip driver under the NAND subsystem.\n");

Indeed, and the other one is marked experimental ;)

> Please follow this advise. The docxx stuff in mtd/devices will be
> removed in the near future and INFTL with the old drivers was missing
> some functionality anyway, AFAIK.

Yes, sure, I will switch to new drivers ASAP, but we (project people)
have taken 2.6.7 as reference, so we'll use this patch for a few
more weeks.

I've tried to update to newer MTD kernel part, keeping the rest in 2.6.7
state, but some of the API seems to have changed.

> The chip ID part of your patch is giving me a bit more headache. The
> ID 0xA5 is a valid ID for NAND 2GiB 1,8V 8-bit.

Whoops, didn't pay attention to this :(

[...]
> Please figure out the DoC
> partnumber and let M-Sys confirm this. If they confirm that some moron
> started to break the ID rules, then we have to figure out a way to
> make this work. Putting this line without any further modifications
> into the code would break other drivers.

Is there some means to determine chip type by software ?
Things I can read on the chip (hoping i'm correct, it is not very
readable) are:
"M-Systems
Disc-on-chip
MD333-D64-V3-X
Japan 033-----" (dunno what's under "----")

-- 
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc


[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Re: Patch !
  2004-10-02 13:55     ` Patch ! Nicolas Pouillon
@ 2004-10-02 20:42       ` Thomas Gleixner
  2004-10-03  1:11         ` Nicolas Pouillon
       [not found]         ` <20041003030653.2e0452a7.nipo@ssji.net>
  0 siblings, 2 replies; 15+ messages in thread
From: Thomas Gleixner @ 2004-10-02 20:42 UTC (permalink / raw)
  To: Nicolas Pouillon; +Cc: linux-mtd

On Sat, 2004-10-02 at 15:55, Nicolas Pouillon wrote:
> I made two patches, for different handleds.org kernel dates (fall July,
> (the one I'm working on): 2.6.7, and now: 2.6.8.1)
> 
> (I've not tried 2.6.8.1 version)

You should have tried 2.6.8.1 !!

Did you notice the DEPRECATED NOTE in Kconfig ????

INFTL in 2.6.8.1 tells you: 
"INFTL no longer supports the old DiskOnChip drivers loaded via
docprobe.\n"
"Please use the new diskonchip driver under the NAND subsystem.\n");

Please follow this advise. The docxx stuff in mtd/devices will be
removed in the near future and INFTL with the old drivers was missing
some functionality anyway, AFAIK.

The chip ID part of your patch is giving me a bit more headache. The ID
0xA5 is a valid ID for NAND 2GiB 1,8V 8-bit.
Since NAND is available _all_ manufacturers use the same Chip ID codes
for chips with the same specifications. All Cardreaders, MP3-Players and
Digicams rely on those ID's.
I doubt that there are 32 MiB chips around with chip ID 0xA5. The Chip
ID in all Toshiba datasheets of their various 32MiB NAND chips is 0x75. 
I'm not going to put this line into the code without sensible
confirmation that this is the real ID. Please figure out the DoC
partnumber and let M-Sys confirm this. If they confirm that some moron
started to break the ID rules, then we have to figure out a way to make
this work. Putting this line without any further modifications into the
code would break other drivers.

tglx

^ permalink raw reply	[flat|nested] 15+ messages in thread

* Patch !
  2004-10-01 14:27   ` Nicolas Pouillon
@ 2004-10-02 13:55     ` Nicolas Pouillon
  2004-10-02 20:42       ` Thomas Gleixner
  0 siblings, 1 reply; 15+ messages in thread
From: Nicolas Pouillon @ 2004-10-02 13:55 UTC (permalink / raw)
  To: linux-mtd

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

[Fri, 1 Oct 2004 16:27:05 +0200]
Nicolas Pouillon <nipo@ssji.net> eut le bonheur d'écrire:

> I'll submit a patch for these.

Here it is, but I dont like changing 0 to -1 for undefined.
Maybe adding (another) config option could be better (like "force null
address probing")... thoughts ?

I made two patches, for different handleds.org kernel dates (fall July,
(the one I'm working on): 2.6.7, and now: 2.6.8.1)

http://nipo.ssji.net/mtd/patches/
(I've not tried 2.6.8.1 version)

-- 
Nipo <nipo@ssji.net>
Gnu-PGP: 1024D/1DBF658F
http://nipo.ssji.net/nipo.asc

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 15+ messages in thread

* PATCH:
@ 2000-07-12 16:24 Juan J. Quintela
  0 siblings, 0 replies; 15+ messages in thread
From: Juan J. Quintela @ 2000-07-12 16:24 UTC (permalink / raw)
  To: lkml, linux-mm, linus

Hi
        somebody pointed out that mm->rss is defined as an unsigned
        long, I think this patch is needed to do the desired effect.
        I have not founded other invalid uses of mm->rss.  Only that
        in someplaces it is tested against (mm->rss <= 0) instead of
        (mm->rss == 0).  I think that the last checks are harmless.

Later, Juan.

diff -urN --exclude-from=/home/lfcia/quintela/work/kernel/exclude base/mm/memory.c working/mm/memory.c
--- base/mm/memory.c	Mon May 15 21:00:33 2000
+++ working/mm/memory.c	Wed Jul 12 03:55:11 2000
@@ -373,12 +373,12 @@
 	spin_unlock(&mm->page_table_lock);
 	/*
 	 * Update rss for the mm_struct (not necessarily current->mm)
+	 * Notice that rss is an unsigned long.
 	 */
-	if (mm->rss > 0) {
+	if (mm->rss > freed)
 		mm->rss -= freed;
-		if (mm->rss < 0)
-			mm->rss = 0;
-	}
+	else
+		mm->rss = 0;
 }
 
 


-- 
In theory, practice and theory are the same, but in practice they 
are different -- Larry McVoy
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org.  For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2007-04-29  7:46 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-04-28 21:47 PATCH: Mark Lord
2007-04-28 21:48 ` PATCH: libata: add support for ATA_16 on ATAPI Mark Lord
2007-04-29  7:46   ` Tejun Heo
  -- strict thread matches above, loose matches on Subject: below --
2004-11-21 23:58 Patch, Andreas Fenkart
2004-11-22  6:37 ` Patch, Jaroslav Kysela
2004-10-01 13:46 Issues with a Doc Milplus Nicolas Pouillon
2004-10-01 13:57 ` David Woodhouse
2004-10-01 14:27   ` Nicolas Pouillon
2004-10-02 13:55     ` Patch ! Nicolas Pouillon
2004-10-02 20:42       ` Thomas Gleixner
2004-10-03  1:11         ` Nicolas Pouillon
     [not found]         ` <20041003030653.2e0452a7.nipo@ssji.net>
     [not found]           ` <1096768161.21297.129.camel@thomas>
2004-10-03 20:18             ` Nicolas Pouillon
2004-10-04  8:05               ` Thomas Gleixner
2004-10-04 16:38                 ` Nicolas Pouillon
2004-10-04 17:59                   ` Thomas Gleixner
2004-10-04 20:47                     ` Nicolas Pouillon
2004-10-04 21:04                       ` Thomas Gleixner
2000-07-12 16:24 PATCH: Juan J. Quintela

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.