All of lore.kernel.org
 help / color / mirror / Atom feed
* Issues with a Doc Milplus
@ 2004-10-01 13:46 Nicolas Pouillon
  2004-10-01 13:57 ` David Woodhouse
  0 siblings, 1 reply; 16+ messages in thread
From: Nicolas Pouillon @ 2004-10-01 13:46 UTC (permalink / raw)
  To: linux-mtd

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

Hello list !

I'm porting Linux to my PDA (Asus A620).
It has a DocMilPlus inside.
I'm running handhelds.org kernel, which has a non-up-to-date mtd part.
http://cvs.handhelds.org/cgi-bin/viewcvs.cgi/linux/kernel26/drivers/mtd/
(It still has Self-contained drivers)

When trying to make MTD part work, I bumped in different problems:


1/ Doc is mapped to mem address 0x0, in docprobe.c there is an
expression like: 
if (doc_config_location) {
	[probe at specified address]
} else {
	[probe hardlisted addresses]
}

So it never probes for my chip at 0. I noticed the same construct is
present in newer probing routines.
Is there a special way of declaring a chip at 0x0 ?


2/ It was not known by nan_ids, I had to add the following line:
{"NAND 64MiB 3,3V", 0xa5, 26, 0x4000, 0},

Then the chip is detected as:

INFTL: inftlcore.c $Revision: 1.14 $, inftlmount.c $Revision: 1.12 $
Using configured DiskOnChip probe address 0x0
DiskOnChip Millennium Plus found at address 0x0
Flash chip found: Manufacturer ID: 98, Chip ID: A5 (Toshiba:MyNAND 64MiB
3,3V) 
Flash chip found: Manufacturer ID: 98, Chip ID: A5 (Toshiba:MyNAND64MiB
3,3V) 
2 flash chips found. Total DiskOnChip size: 128 MiB
INFTL: could not find valid boot record?
INFTL: could not mount device
slram: not enough parameters.


3/ It seems to be detected twice, it should be 64MiB total, and there is
physically one chip on the board.
Could one chip be virtually two 32MiB chips ?
Is there some special tweaking I missed ?


4/ Using arm part in doc2000.h which is:
#define ReadDOC_(adr, reg)      ((unsigned char)(*(volatile __u32
*)(((unsigned long)adr)+((reg)<<2)))) 
#define WriteDOC_(d, adr, reg) do{ *(volatile __u32 *)(((unsigned
#long)adr)+((reg)<<2)) = (__u32)d; wmb();} while(0)

makes the machine crash, I have to use readb/writeb in order to make the
device work.



I'm sorry for this so-long mail, dont hesitate to flame me with some
RTFMs if I need them, but I've not found similar solved entries ;)

Thanks !

-- 
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] 16+ messages in thread
* PATCH:
@ 2007-04-28 21:47 Mark Lord
  0 siblings, 0 replies; 16+ 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] 16+ messages in thread
* Patch,
@ 2004-11-21 23:58 Andreas Fenkart
  2004-11-22  6:37 ` Patch, Jaroslav Kysela
  0 siblings, 1 reply; 16+ 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] 16+ messages in thread
* PATCH:
@ 2000-07-12 16:24 Juan J. Quintela
  0 siblings, 0 replies; 16+ 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] 16+ messages in thread

end of thread, other threads:[~2007-04-28 21:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2007-04-28 21:47 PATCH: Mark Lord
2004-11-21 23:58 Patch, Andreas Fenkart
2004-11-22  6:37 ` Patch, Jaroslav Kysela
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.