Skip to contentSkip to conversation

linux 2.5.4-pre3 and IDE changes

DISCUSSION John Weber 8 participants 9 messages Feb 8, 2002

lore
Share & tools
lore

John Weber

author
#0 lore raw

The address member of struct scatterlist appears to have been changed to dma_address.

A simple s/\.address/\.dma_address/ should fix this compile error.

ide-dma.c: In function `ide_raw_build_sglist':
ide-dma.c:269: structure has no member named address' ide-dma.c:276: structure has no member named address' make[3]: *** [ide-dma.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.4/drivers'
make: *** [_dir_drivers] Error 2

#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"John" == John Weber <[email protected]> writes:

John> The address member of struct scatterlist appears to have John> been changed to dma_address.

was is changed to dma_address or was it
removed completely?

struct scatterlist {
- /* This will disappear in 2.5.x */
- char *address;

ryan

#2 lore raw
In reply to John Weber
Quoted 6 lines · John Weber

The address member of struct scatterlist appears to have been changed to dma_address.

A simple s/\.address/\.dma_address/ should fix this compile error.

Quoted 10 lines

ide-dma.c: In function `ide_raw_build_sglist':
ide-dma.c:269: structure has no member named address' ide-dma.c:276: structure has no member named address' make[3]: *** [ide-dma.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.4/drivers'
make: *** [_dir_drivers] Error 2

According to another poster on lkml, the attached patch from Jens is needed.

Signature · 3 lines
Jeff Garzik      | "I went through my candy like hot oatmeal
Building 1024    |  through an internally-buttered weasel."
MandrakeSoft     |             - goats.com
drivers/ide/ide-dma.c +4 -2
diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
@@ -266,14 +266,16 @@
 #if 1	
 	if (sector_count > 128) {
 		memset(&sg[nents], 0, sizeof(*sg));
-		sg[nents].address = virt_addr;
+		sg[nents].page = virt_to_page(virt_addr);
+		sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
 		sg[nents].length = 128  * SECTOR_SIZE;
 		nents++;
 		virt_addr = virt_addr + (128 * SECTOR_SIZE);
 		sector_count -= 128;
 	}
 	memset(&sg[nents], 0, sizeof(*sg));
-	sg[nents].address = virt_addr;
+	sg[nents].page = virt_to_page(virt_addr);
+	sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
 	sg[nents].length =  sector_count  * SECTOR_SIZE;
 	nents++;
  #endif
#3 lore raw
In reply to John Weber
Quoted 5 lines · John Weber

The address member of struct scatterlist appears to have been changed to dma_address.

A simple s/\.address/\.dma_address/ should fix this compile error.

Quoted 10 lines

ide-dma.c: In function `ide_raw_build_sglist':
ide-dma.c:269: structure has no member named address' ide-dma.c:276: structure has no member named address' make[3]: *** [ide-dma.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.4/drivers'
make: *** [_dir_drivers] Error 2

This is the patch that Jens posted, though he posted it before this kernel was even released. His post said it fixed a compile error in pre2, but pre2 compiled fine. It _does_ fix the compile error in pre3 though.

Signature · 1 line
Skip
drivers/ide/ide-dma.c +4 -2
diff -Nru a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c
@@ -266,14 +266,16 @@
 #if 1	
 	if (sector_count > 128) {
 		memset(&sg[nents], 0, sizeof(*sg));
-		sg[nents].address = virt_addr;
+		sg[nents].page = virt_to_page(virt_addr);
+		sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
 		sg[nents].length = 128  * SECTOR_SIZE;
 		nents++;
 		virt_addr = virt_addr + (128 * SECTOR_SIZE);
 		sector_count -= 128;
 	}
 	memset(&sg[nents], 0, sizeof(*sg));
-	sg[nents].address = virt_addr;
+	sg[nents].page = virt_to_page(virt_addr);
+	sg[nents].offset = (unsigned long) virt_addr & ~PAGE_MASK;
 	sg[nents].length =  sector_count  * SECTOR_SIZE;
 	nents++;
  #endif
#4 lore raw
Quoted 4 lines · Skip Ford

This is the patch that Jens posted, though he posted it before this kernel was even released. His post said it fixed a compile error in pre2, but pre2 compiled fine. It _does_ fix the compile error in pre3 though.

As more developers start pulling Linus' bitkeeper tree, you'll probably see more bugs getting fixed before they're reported 8-)

Signature · 2 lines
| Dave Jones.        http://www.codemonkey.org.uk
| SuSE Labs
#5 lore raw
Quoted 9 lines · Dave Jones
Quoted 4 lines · Skip Ford

This is the patch that Jens posted, though he posted it before this kernel was even released. His post said it fixed a compile error in pre2, but pre2 compiled fine. It _does_ fix the compile error in pre3 though.

As more developers start pulling Linus' bitkeeper tree, you'll probably see more bugs getting fixed before they're reported 8-)

Ah, but taking this one step further, most people will never see the bugs as the fixes will be applied by Linus before he releases the pending pre kernel so the pre kernel won't have the bug. (-8

Only the bk changelog will tell us they ever existed... (-;

Anton

Signature · 5 lines
  "I've not lost my mind. It's backed up on tape somewhere." - Unknown
-- 
Anton Altaparmakov <aia21 at cam.ac.uk> (replace at with @)
Linux NTFS Maintainer / WWW: http://linux-ntfs.sf.net/
ICQ: 8561279 / WWW: http://www-stu.christs.cam.ac.uk/~aia21/
#6 lore raw
In reply to John Weber

I repeat that is a diagnostic layer and is to never be called from the kernel, it is a user-space only and will go away.

Quoted 16 lines · John Weber

The address member of struct scatterlist appears to have been changed to dma_address.

A simple s/\.address/\.dma_address/ should fix this compile error.

ide-dma.c: In function `ide_raw_build_sglist':
ide-dma.c:269: structure has no member named address' ide-dma.c:276: structure has no member named address' make[3]: *** [ide-dma.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.4/drivers'
make: *** [_dir_drivers] Error 2

Quoted 6 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Andre Hedrick
Linux Disk Certification Project Linux ATA Development

#7 lore raw
In reply to John Weber

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 3 lines · Andre Hedrick

I repeat that is a diagnostic layer and is to never be called from the kernel, it is a user-space only and will go away.

Maybe so, but I got pre3 to boot finally with that patch and it works fine.

- --
Skip ID: 0x7EDDDB0A
-----BEGIN PGP SIGNATURE-----

iEYEARECAAYFAjxja3oACgkQBMKxVH7d2wpoqQCgmvuwyMF+NtjgFP3zhZguLjMb uiEAniwZm7fifpuvWjIdhUCNcbnI8JVM
=ACIo
-----END PGP SIGNATURE-----

#8 lore raw
In reply to John Weber
Quoted 3 lines · Andre Hedrick

I repeat that is a diagnostic layer and is to never be called from the kernel, it is a user-space only and will go away.

But it should compile nevertheless, shouldn't it?

Quoted 34 lines · John Weber
Quoted 17 lines

The address member of struct scatterlist appears to have been changed to dma_address.

A simple s/\.address/\.dma_address/ should fix this compile error.

ide-dma.c: In function `ide_raw_build_sglist':
ide-dma.c:269: structure has no member named address' ide-dma.c:276: structure has no member named address' make[3]: *** [ide-dma.o] Error 1
make[3]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[2]: *** [first_rule] Error 2
make[2]: Leaving directory `/usr/src/linux-2.5.4/drivers/ide' make[1]: *** [_subdir_ide] Error 2
make[1]: Leaving directory `/usr/src/linux-2.5.4/drivers'
make: *** [_dir_drivers] Error 2

Quoted 6 lines

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Andre Hedrick
Linux Disk Certification Project Linux ATA Development

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

Signature · 2 lines
Vojtech Pavlik
SuSE Labs