2001-11-12 19:06:24

by Linus Torvalds

[permalink] [raw]
Subject: Linux 2.4.15-pre4 - merge with Alan


Ok, this kernel hopefully contains all the high-priority merges with Alan,
which means that as far as that is concerned, I'm done with 2.4.x and
ready to pass it on to Marcelo.

Which means that I'd also like people to double-check that there are no
embarrassing missing pieces due to the merge (or other patches).

Known issue: Al Viro fixed the nasty overflow with /proc/cpuinfo and
multiple CPU's, but only for x86. So other architectures need to convert
from the old "get_cpuinfo()" to the seq-file-based "show_cpuinfo()". The
conversion should be pretty mindless and straightforward.. (ie use
"seq_printf()" instead of "sprintf()" etc - see arch/i386/kernel/setup.c
for the example code).

Changelog appeded,

Linus

-----
pre4:
- Mikael Pettersson: make proc_misc happy without modules
- Arjan van de Ven: clean up acpitable implementation ("micro-acpi")
- Anton Altaparmakov: LDM partition code update
- Alan Cox: final (yeah, sure) small missing pieces
- Andrey Savochkin/Andrew Morton: eepro100 config space save/restore over suspend
- Arjan van de Ven: remove power from pcmcia socket on card remove
- Greg KH: USB updates
- Neil Brown: multipath updates
- Martin Dalecki: fix up some "asmlinkage" routine markings

pre3:
- Alan Cox: more driver merging
- Al Viro: make ext2 group allocation more readable

pre2:
- Ivan Kokshaysky: fix alpha dec_and_lock with modules, for alpha config entry
- Kai Germaschewski: ISDN updates
- Jeff Garzik: network driver updates, sysv fs update
- Kai M?kisara: SCSI tape update
- Alan Cox: large drivers merge
- Nikita Danilov: reiserfs procfs information
- Andrew Morton: ext3 merge
- Christoph Hellwig: vxfs livelock fix
- Trond Myklebust: NFS updates
- Jens Axboe: cpqarray + cciss dequeue fix
- Tim Waugh: parport_serial base_baud setting
- Matthew Dharm: usb-storage Freecom driver fixes
- Dave McCracken: wait4() thread group race fix

pre1:
- me: fix page flags race condition Andrea found
- David Miller: sparc and network updates
- various: fix loop driver that thought it was part of the VM system
- me: teach DRM about VM_RESERVED
- Alan Cox: more merging


2001-11-12 19:17:14

by Martin Dalecki

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

I just scrolled one line firther down and
noticed the same problem for ep7211_ir_init
as for sa1100_irda_init. Citing form the corrover patch
between pre-patches you can easly see:

+++ linux/net/irda/irda_device.c Fri Nov 9 14:22:17 2001
++++ linux/net/irda/irda_device.c Sun Nov 11 10:20:21 2001
@@ -10,6 +10,7 @@
* Modified by: Dag Brattli <[email protected]>
*
@@ -140040,27 +184071,33 @@

static void __irda_task_delete(struct irda_task *task);

-@@ -124,6 +127,9 @@
+@@ -124,6 +127,12 @@
#ifdef CONFIG_WINBOND_FIR
w83977af_init();
#endif
+#ifdef CONFIG_SA1100_FIR
+ sa1100_irda_init();
+#endif
++#ifdef CONFIG_SA1100_FIR
++ sa1100_irda_init();
++#endif
#ifdef CONFIG_NSC_FIR
nsc_ircc_init();
#endif
-@@ -151,6 +157,9 @@
+@@ -151,6 +160,12 @@
#ifdef CONFIG_OLD_BELKIN
old_belkin_init();
#endif
+#ifdef CONFIG_EP7211_IR
+ ep7211_ir_init();
+#endif
++#ifdef CONFIG_EP7211_IR
++ ep7211_ir_init();
++#endif
return 0;
}

-@@ -181,7 +190,10 @@

Supposedly there is still room for -pre5 ;-).

2001-11-12 19:18:30

by Trever L. Adams

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

Red Hat mounts /dev/shm as tmpfs instead of shmfs. From what I can tell
this is accurate. However since the beginning of the new VM, it seems
that shmfs/tmpfs leaks memory.

I am just curious about how I can look into this so that I can ease my
mind as well as anyone else who notices this.

Trever


2001-11-12 19:27:24

by Matthew Dharm

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

Just as a heads-up for interested people... this kernel does contain the
final fixes for the Freecom adaptor, even tho it's not listed.

Matt

On Mon, Nov 12, 2001 at 11:01:56AM -0800, Linus Torvalds wrote:
>
> Ok, this kernel hopefully contains all the high-priority merges with Alan,
> which means that as far as that is concerned, I'm done with 2.4.x and
> ready to pass it on to Marcelo.
>
> Which means that I'd also like people to double-check that there are no
> embarrassing missing pieces due to the merge (or other patches).
>
> Known issue: Al Viro fixed the nasty overflow with /proc/cpuinfo and
> multiple CPU's, but only for x86. So other architectures need to convert
> from the old "get_cpuinfo()" to the seq-file-based "show_cpuinfo()". The
> conversion should be pretty mindless and straightforward.. (ie use
> "seq_printf()" instead of "sprintf()" etc - see arch/i386/kernel/setup.c
> for the example code).
>
> Changelog appeded,
>
> Linus
>
> -----
> pre4:
> - Mikael Pettersson: make proc_misc happy without modules
> - Arjan van de Ven: clean up acpitable implementation ("micro-acpi")
> - Anton Altaparmakov: LDM partition code update
> - Alan Cox: final (yeah, sure) small missing pieces
> - Andrey Savochkin/Andrew Morton: eepro100 config space save/restore over suspend
> - Arjan van de Ven: remove power from pcmcia socket on card remove
> - Greg KH: USB updates
> - Neil Brown: multipath updates
> - Martin Dalecki: fix up some "asmlinkage" routine markings
>
> pre3:
> - Alan Cox: more driver merging
> - Al Viro: make ext2 group allocation more readable
>
> pre2:
> - Ivan Kokshaysky: fix alpha dec_and_lock with modules, for alpha config entry
> - Kai Germaschewski: ISDN updates
> - Jeff Garzik: network driver updates, sysv fs update
> - Kai M?kisara: SCSI tape update
> - Alan Cox: large drivers merge
> - Nikita Danilov: reiserfs procfs information
> - Andrew Morton: ext3 merge
> - Christoph Hellwig: vxfs livelock fix
> - Trond Myklebust: NFS updates
> - Jens Axboe: cpqarray + cciss dequeue fix
> - Tim Waugh: parport_serial base_baud setting
> - Matthew Dharm: usb-storage Freecom driver fixes
> - Dave McCracken: wait4() thread group race fix
>
> pre1:
> - me: fix page flags race condition Andrea found
> - David Miller: sparc and network updates
> - various: fix loop driver that thought it was part of the VM system
> - me: teach DRM about VM_RESERVED
> - Alan Cox: more merging
>
> -
> 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/

--
Matthew Dharm Home: [email protected]
Maintainer, Linux USB Mass Storage Driver

SP: I sell software for Microsoft. Can you set me free?
DP: Natural Selection says I shouldn't.
-- MS Salesman and Dust Puppy
User Friendly, 4/2/1998


Attachments:
(No filename) (2.93 kB)
(No filename) (232.00 B)
Download all attachments

2001-11-12 19:43:34

by Greg KH

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Mon, Nov 12, 2001 at 11:01:56AM -0800, Linus Torvalds wrote:
>
> Which means that I'd also like people to double-check that there are no
> embarrassing missing pieces due to the merge (or other patches).

This tiny patch to arch/i386/config.in is needed to be able to select
the PCI Hotplug driver so that it can be used.

thanks,

greg k-h


diff --minimal -Nru a/arch/i386/config.in b/arch/i386/config.in
--- a/arch/i386/config.in Mon Nov 12 11:34:30 2001
+++ b/arch/i386/config.in Mon Nov 12 11:34:30 2001
@@ -234,8 +234,10 @@

if [ "$CONFIG_HOTPLUG" = "y" ] ; then
source drivers/pcmcia/Config.in
+ source drivers/hotplug/Config.in
else
define_bool CONFIG_PCMCIA n
+ define_bool CONFIG_HOTPLUG_PCI n
fi

bool 'System V IPC' CONFIG_SYSVIPC

2001-11-12 21:14:31

by Robert Cantu

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


pre4:
--snip--
- Andrey Savochkin/Andrew Morton: eepro100 config space save/restore over suspend
--snip--

My eepro100 mini-pci card on my laptop currently doesn't handle sleep/suspend very well
for me and needs a reboot to work again. mii-diag output gives wierd data such as
the MAC address set to ff:ff:ff:ff:ff:ff. Looking at the patch code, it seems that
pci_save_state() and pci_restore_state(), among other things, implements this.
Will this work with APM's suspend/sleep functions?


2001-11-12 23:43:28

by J.A. Magallon

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


On 20011112 Linus Torvalds wrote:
>
>Ok, this kernel hopefully contains all the high-priority merges with Alan,
>which means that as far as that is concerned, I'm done with 2.4.x and
>ready to pass it on to Marcelo.
>
>Which means that I'd also like people to double-check that there are no
>embarrassing missing pieces due to the merge (or other patches).
>

This bit is in Alan's but not in your tree (also is in original aic-6.2.4):

diff -u -r -N linux-2.4.12.virgin/drivers/scsi/scsi_error.c linux-2.4.12/drivers/scsi/scsi_error.c
--- linux-2.4.12.virgin/drivers/scsi/scsi_error.c Sun Sep 9 11:52:35 2001
+++ linux-2.4.12/drivers/scsi/scsi_error.c Thu Oct 11 13:57:36 2001
@@ -1009,13 +1009,7 @@
SCpnt->flags &= ~IS_RESETTING;
goto maybe_retry;
}
- /*
- * Examine the sense data to figure out how to proceed from here.
- * If there is no sense data, we will be forced into the error
- * handler thread, where we get to examine the thing in a lot more
- * detail.
- */
- return scsi_check_sense(SCpnt);
+ return SUCCESS;
default:
return FAILED;
}

Is really needed ?

--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre3-beo #1 SMP Mon Nov 12 00:04:41 CET 2001 i686

2001-11-12 23:45:48

by J.A. Magallon

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


On 20011112 Linus Torvalds wrote:
>
>Ok, this kernel hopefully contains all the high-priority merges with Alan,
>which means that as far as that is concerned, I'm done with 2.4.x and
>ready to pass it on to Marcelo.
>
>Which means that I'd also like people to double-check that there are no
>embarrassing missing pieces due to the merge (or other patches).
>

Many time ago, this was posted in the list as a cleanup-dead-code-removal. Is
still valid for 2.4.15 ?

--- linux/drivers/scsi/tmscsim.c Fri Apr 27 23:07:19 2001
+++ linux/drivers/scsi/tmscsim.c Wed Jul 4 02:51:48 2001
@@ -1352,84 +1352,7 @@
return(0);
}

-/* We ignore mapping problems, as we expect everybody to respect
- * valid partition tables. Waiting for complaints ;-) */
-
#ifdef CONFIG_SCSI_DC390T_TRADMAP
-/*
- * The next function, partsize(), is copied from scsicam.c.
- *
- * This is ugly code duplication, but I didn't find another way to solve it:
- * We want to respect the partition table and if it fails, we apply the
- * DC390 BIOS heuristic. Too bad, just calling scsicam_bios_param() doesn't do
- * the job, because we don't know, whether the values returned are from
- * the part. table or determined by setsize(). Unfortunately the setsize()
- * values differ from the ones chosen by the DC390 BIOS.
- *
- * Looking forward to seeing suggestions for a better solution! KG, 98/10/14
- */
-#include <asm/unaligned.h>
-
-/*
- * Function : static int partsize(struct buffer_head *bh, unsigned long
- * capacity,unsigned int *cyls, unsigned int *hds, unsigned int *secs);
- *
- * Purpose : to determine the BIOS mapping used to create the partition
- * table, storing the results in *cyls, *hds, and *secs
- *
- * Returns : -1 on failure, 0 on success.
- *
- */
-
-static int partsize(struct buffer_head *bh, unsigned long capacity,
- unsigned int *cyls, unsigned int *hds, unsigned int *secs) {
- struct partition *p, *largest = NULL;
- int i, largest_cyl;
- int cyl, ext_cyl, end_head, end_cyl, end_sector;
- unsigned int logical_end, physical_end, ext_physical_end;
-
-
- if (*(unsigned short *) (bh->b_data+510) == 0xAA55) {
- for (largest_cyl = -1, p = (struct partition *)
- (0x1BE + bh->b_data), i = 0; i < 4; ++i, ++p) {
- if (!p->sys_ind)
- continue;
- cyl = p->cyl + ((p->sector & 0xc0) << 2);
- if (cyl > largest_cyl) {
- largest_cyl = cyl;
- largest = p;
- }
- }
- }
-
- if (largest) {
- end_cyl = largest->end_cyl + ((largest->end_sector & 0xc0) << 2);
- end_head = largest->end_head;
- end_sector = largest->end_sector & 0x3f;
-
- physical_end = end_cyl * (end_head + 1) * end_sector +
- end_head * end_sector + end_sector;
-
- /* This is the actual _sector_ number at the end */
- logical_end = get_unaligned(&largest->start_sect)
- + get_unaligned(&largest->nr_sects);
-
- /* This is for >1023 cylinders */
- ext_cyl= (logical_end-(end_head * end_sector + end_sector))
- /(end_head + 1) / end_sector;
- ext_physical_end = ext_cyl * (end_head + 1) * end_sector +
- end_head * end_sector + end_sector;
-
- if ((logical_end == physical_end) ||
- (end_cyl==1023 && ext_physical_end==logical_end)) {
- *secs = end_sector;
- *hds = end_head + 1;
- *cyls = capacity / ((end_head + 1) * end_sector);
- return 0;
- }
- }
- return -1;
-}

/***********************************************************************
* Function:
@@ -1442,46 +1365,38 @@
* Note:
* In contrary to other externally callable funcs (DC390_), we don't lock
***********************************************************************/
-int DC390_bios_param (Disk *disk, kdev_t devno, int geom[])
+int DC390_bios_param (Disk *disk, kdev_t dev, int *geom)
{
int heads, sectors, cylinders;
- PACB pACB = (PACB) disk->device->host->hostdata;
- struct buffer_head *bh;
- int ret_code = -1;
- int size = disk->capacity;
-
- if ((bh = bread(MKDEV(MAJOR(devno), MINOR(devno)&~0xf), 0, 1024)))
- {
- /* try to infer mapping from partition table */
- ret_code = partsize (bh, (unsigned long) size, (unsigned int *) geom + 2,
- (unsigned int *) geom + 0, (unsigned int *) geom + 1);
- brelse (bh);
- }
- if (ret_code == -1)
- {
- heads = 64;
- sectors = 32;
- cylinders = size / (heads * sectors);
-
- if ( (pACB->Gmode2 & GREATER_1G) && (cylinders > 1024) )
- {
- heads = 255;
- sectors = 63;
- cylinders = size / (heads * sectors);
- }
-
- geom[0] = heads;
- geom[1] = sectors;
- geom[2] = cylinders;
+ PACB pACB;
+ unsigned long size = disk->capacity;
+
+ if (scsi_bios_param_from_MBR(dev, size, geom) == 0)
+ return 0;
+
+ heads = 64;
+ sectors = 32;
+ cylinders = size / (heads * sectors);
+
+ pACB = (PACB) disk->device->host->hostdata;
+
+ if ( (pACB->Gmode2 & GREATER_1G) && (cylinders > 1024) ) {
+ heads = 255;
+ sectors = 63;
+ cylinders = size / (heads * sectors);
}

- return (0);
+ geom[0] = heads;
+ geom[1] = sectors;
+ geom[2] = cylinders;
+
+ return 0;
}
#else
-int DC390_bios_param (Disk *disk, kdev_t devno, int geom[])
+int DC390_bios_param (Disk *disk, kdev_t dev, int *geom)
{
- return scsicam_bios_param (disk, devno, geom);
-};
+ return scsicam_bios_param (disk, dev, geom);
+}
#endif


--- linux/drivers/scsi/BusLogic.c Sun Nov 12 04:01:11 2000
+++ linux/drivers/scsi/BusLogic.c Wed Jul 4 02:51:48 2001
@@ -4131,7 +4131,7 @@
/*
Attempt to read the first 1024 bytes from the disk device.
*/
- BufferHead = bread(MKDEV(MAJOR(Device), MINOR(Device) & ~0x0F), 0, 1024);
+ BufferHead = scsi_get_block_zero(Device);
if (BufferHead == NULL) return 0;
/*
If the boot sector partition table flag is valid, search for a partition
--- linux/drivers/scsi/aic7xxx_old.c Tue Jul 3 20:41:38 2001
+++ linux/drivers/scsi/aic7xxx_old.c Wed Jul 4 02:51:48 2001
@@ -11732,29 +11732,21 @@
* Return the disk geometry for the given SCSI device.
*-F*************************************************************************/
int
-aic7xxx_biosparam(Disk *disk, kdev_t dev, int geom[])
+aic7xxx_biosparam(Disk *disk, kdev_t dev, int *geom)
{
- int heads, sectors, cylinders, ret;
+ int heads, sectors, cylinders;
struct aic7xxx_host *p;
- struct buffer_head *bh;

- p = (struct aic7xxx_host *) disk->device->host->hostdata;
- bh = bread(MKDEV(MAJOR(dev), MINOR(dev)&~0xf), 0, 1024);
-
- if ( bh )
- {
- ret = scsi_partsize(bh, disk->capacity, &geom[2], &geom[0], &geom[1]);
- brelse(bh);
- if ( ret != -1 )
- return(ret);
- }
+ if (scsi_bios_param_from_MBR(dev, disk->capacity, geom) == 0)
+ return 0;

heads = 64;
sectors = 32;
cylinders = disk->capacity / (heads * sectors);

- if ((p->flags & AHC_EXTEND_TRANS_A) && (cylinders > 1024))
- {
+ p = (struct aic7xxx_host *) disk->device->host->hostdata;
+
+ if ((p->flags & AHC_EXTEND_TRANS_A) && (cylinders > 1024)) {
heads = 255;
sectors = 63;
cylinders = disk->capacity / (heads * sectors);
@@ -11764,7 +11764,7 @@
geom[1] = sectors;
geom[2] = cylinders;

- return (0);
+ return 0;
}

/*+F*************************************************************************
--- linux/drivers/scsi/scsi.h Sat May 26 03:02:21 2001
+++ linux/drivers/scsi/scsi.h Wed Jul 4 02:39:42 2001
@@ -443,9 +443,11 @@
/*
* Prototypes for functions in scsicam.c
*/
-extern int scsi_partsize(struct buffer_head *bh, unsigned long capacity,
- unsigned int *cyls, unsigned int *hds,
- unsigned int *secs);
+extern struct buffer_head *scsi_get_block_zero(kdev_t dev);
+extern int scsi_bios_param_from_MBR(kdev_t dev, unsigned long size, int *ip);
+extern int scsi_partsize(struct buffer_head *bh, unsigned long capacity,
+ unsigned int *cyls, unsigned int *hds,
+ unsigned int *secs);

/*
* Prototypes for functions in scsi_dma.c
--- linux/drivers/scsi/scsicam.c Fri Nov 19 04:09:14 1999
+++ linux/drivers/scsi/scsicam.c Wed Jul 4 02:51:48 2001
@@ -23,60 +23,73 @@
#include "sd.h"
#include <scsi/scsicam.h>

-static int setsize(unsigned long capacity, unsigned int *cyls, unsigned int *hds,
- unsigned int *secs);
+static int setsize(unsigned long capacity, unsigned int *cyls,
+ unsigned int *hds, unsigned int *secs);

+struct buffer_head *
+scsi_get_block_zero(kdev_t dev) {
+ int ma, mi, block;
+
+ ma = MAJOR(dev);
+ mi = (MINOR(dev) & ~0xf);
+
+ block = 1024;
+ if(blksize_size[ma])
+ block = blksize_size[ma][mi];
+
+ return bread(MKDEV(ma,mi), 0, block);
+}

/*
- * Function : int scsicam_bios_param (Disk *disk, int dev, int *ip)
+ * Return: 0: OK
+ * -1: cannot determine geometry
+ * -2: cannot read disk
+ */
+#define DISK_READ_ERROR (-2)
+
+int
+scsi_bios_param_from_MBR(kdev_t dev, unsigned long size, int *ip) {
+ int rc = DISK_READ_ERROR;
+ struct buffer_head *bh;
+
+ bh = scsi_get_block_zero(dev);
+ if (bh) {
+ rc = scsi_partsize(bh, size, ip + 2, ip + 0, ip + 1);
+ brelse(bh);
+ }
+ return rc;
+}
+
+/*
+ * Function : int scsicam_bios_param (Disk *disk, kdev_t dev, int *ip)
*
* Purpose : to determine the BIOS mapping used for a drive in a
* SCSI-CAM system, storing the results in ip as required
* by the HDIO_GETGEO ioctl().
*
- * Returns : -1 on failure, 0 on success.
- *
+ * Returns : -1 on failure (cannot read MBR), 0 on success
*/

-int scsicam_bios_param(Disk * disk, /* SCSI disk */
- kdev_t dev, /* Device major, minor */
- int *ip /* Heads, sectors, cylinders in that order */ )
+int scsicam_bios_param(Disk *disk, kdev_t dev,
+ int *ip /* heads, sectors, cylinders in that order */ )
{
- struct buffer_head *bh;
- int ret_code;
- int size = disk->capacity;
- unsigned long temp_cyl;
-
- int ma = MAJOR(dev);
- int mi = (MINOR(dev) & ~0xf);
-
- int block = 1024;
+ int rc;
+ unsigned long size = disk->capacity;

- if(blksize_size[ma])
- block = blksize_size[ma][mi];
-
- if (!(bh = bread(MKDEV(ma,mi), 0, block)))
+ rc = scsi_bios_param_from_MBR(dev, size, ip);
+ if (rc == DISK_READ_ERROR)
return -1;

- /* try to infer mapping from partition table */
- ret_code = scsi_partsize(bh, (unsigned long) size, (unsigned int *) ip + 2,
- (unsigned int *) ip + 0, (unsigned int *) ip + 1);
- brelse(bh);
-
- if (ret_code == -1) {
- /* pick some standard mapping with at most 1024 cylinders,
- and at most 62 sectors per track - this works up to
- 7905 MB */
- ret_code = setsize((unsigned long) size, (unsigned int *) ip + 2,
- (unsigned int *) ip + 0, (unsigned int *) ip + 1);
- }
+ /* pick some standard mapping with at most 1024 cylinders,
+ and at most 62 sectors per track - this works up to 7905 MB */
+ rc = setsize(size, ip + 2, ip + 0, ip + 1);
+
/* if something went wrong, then apparently we have to return
a geometry with more than 1024 cylinders */
- if (ret_code || ip[0] > 255 || ip[1] > 63) {
+ if (rc || ip[0] > 255 || ip[1] > 63) {
ip[0] = 64;
ip[1] = 32;
- temp_cyl = size / (ip[0] * ip[1]);
- if (temp_cyl > 65534) {
+ if (size / (64 * 32) > 65534) {
ip[0] = 255;
ip[1] = 63;
}
@@ -110,10 +123,6 @@
(0x1BE + bh->b_data), i = 0; i < 4; ++i, ++p) {
if (!p->sys_ind)
continue;
-#ifdef DEBUG
- printk("scsicam_bios_param : partition %d has system \n",
- i);
-#endif
cyl = p->cyl + ((p->sector & 0xc0) << 2);
if (cyl > largest_cyl) {
largest_cyl = cyl;
@@ -128,11 +137,6 @@

if (end_head + 1 == 0 || end_sector == 0)
return -1;
-
-#ifdef DEBUG
- printk("scsicam_bios_param : end at h = %d, c = %d, s = %d\n",
- end_head, end_cyl, end_sector);
-#endif

physical_end = end_cyl * (end_head + 1) * end_sector +
end_head * end_sector + end_sector;

--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre3-beo #1 SMP Mon Nov 12 00:04:41 CET 2001 i686

2001-11-12 23:49:48

by J.A. Magallon

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


On 20011112 Linus Torvalds wrote:
>
>Ok, this kernel hopefully contains all the high-priority merges with Alan,
>which means that as far as that is concerned, I'm done with 2.4.x and
>ready to pass it on to Marcelo.
>
>Which means that I'd also like people to double-check that there are no
>embarrassing missing pieces due to the merge (or other patches).
>

This is an update-cleanup of the i2c code to the current CVS. In short,
it adds version info printing and some CONFIG_ cleanups (there were
CONFIG_ vars defined in Config.in that had been renamed inside the code).
Please consider for next pre of 2.4.15.

--- linux-old/Documentation/i2c/writing-clients Tue Nov 13 00:31:34 CET 2001
+++ linux/Documentation/i2c/writing-clients Tue Nov 13 00:31:34 CET 2001
@@ -366,5 +366,5 @@
The detect client function is called by i2c_probe or i2c_detect.
The `kind' parameter contains 0 if this call is due to a `force'
-parameter, and 0 otherwise (for i2c_detect, it contains 0 if
+parameter, and -1 otherwise (for i2c_detect, it contains 0 if
this call is due to the generic `force' parameter, and the chip type
number if it is due to a specific `force' parameter).
--- linux-old/drivers/i2c/i2c-algo-bit.c Tue Nov 13 00:31:36 CET 2001
+++ linux/drivers/i2c/i2c-algo-bit.c Tue Nov 13 00:31:36 CET 2001
@@ -22,5 +22,5 @@
Frodo Looijaard <[email protected]> */

-/* $Id: i2c-algo-bit.c,v 1.30 2001/07/29 02:44:25 mds Exp $ */
+/* $Id: i2c-algo-bit.c,v 1.33 2001/10/14 15:04:46 mds Exp $ */

#include <linux/kernel.h>
@@ -610,5 +609,5 @@
int __init i2c_algo_bit_init (void)
{
- printk("i2c-algo-bit.o: i2c bit algorithm module\n");
+ printk("i2c-algo-bit.o: i2c bit algorithm module version %s (%s)\n", I2C_VERSION, I2C_DATE);
return 0;
}
--- linux-old/drivers/i2c/i2c-algo-pcf.c Tue Nov 13 00:31:37 CET 2001
+++ linux/drivers/i2c/i2c-algo-pcf.c Tue Nov 13 00:31:37 CET 2001
@@ -151,6 +150,5 @@
/* check to see S1 now used as R/W ctrl -
PCF8584 does that when ESO is zero */
- /* PCF also resets PIN bit */
- if ((temp = get_pcf(adap, 1)) != (0)) {
+ if (((temp = get_pcf(adap, 1)) & 0x7f) != (0)) {
DEB2(printk("i2c-algo-pcf.o: PCF detection failed -- can't select S0 (0x%02x).\n", temp));
return -ENXIO; /* definetly not PCF8584 */
@@ -168,5 +166,5 @@
set_pcf(adap, 1, I2C_PCF_PIN | I2C_PCF_ES1);
/* check to see S2 now selected */
- if ((temp = get_pcf(adap, 1)) != I2C_PCF_ES1) {
+ if (((temp = get_pcf(adap, 1)) & 0x7f) != I2C_PCF_ES1) {
DEB2(printk("i2c-algo-pcf.o: PCF detection failed -- can't select S2 (0x%02x).\n", temp));
return -ENXIO;
@@ -525,5 +523,5 @@
int __init i2c_algo_pcf_init (void)
{
- printk("i2c-algo-pcf.o: i2c pcf8584 algorithm module\n");
+ printk("i2c-algo-pcf.o: i2c pcf8584 algorithm module version %s (%s)\n", I2C_VERSION, I2C_DATE);
return 0;
}
--- linux-old/drivers/i2c/i2c-core.c Tue Nov 13 00:31:40 CET 2001
+++ linux/drivers/i2c/i2c-core.c Tue Nov 13 00:31:40 CET 2001
@@ -21,5 +21,5 @@
All SMBus-related things are written by Frodo Looijaard <[email protected]> */

-/* $Id: i2c-core.c,v 1.64 2001/08/13 01:35:56 mds Exp $ */
+/* $Id: i2c-core.c,v 1.69 2001/10/28 20:41:47 mds Exp $ */

#include <linux/module.h>
@@ -37,5 +36,5 @@
#include <linux/init.h>

-#if LINUX_VERSION_CODE < KERNEL_VERSION(2,3,1)
+#if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,18)
#define init_MUTEX(s) do { *(s) = MUTEX; } while(0)
#endif
@@ -1264,5 +1263,5 @@
static int __init i2c_init(void)
{
- printk("i2c-core.o: i2c core module\n");
+ printk("i2c-core.o: i2c core module version %s (%s)\n", I2C_VERSION, I2C_DATE);
memset(adapters,0,sizeof(adapters));
memset(drivers,0,sizeof(drivers));
@@ -1285,11 +1284,11 @@
extern int i2c_algo_bit_init(void);
#endif
-#ifdef CONFIG_I2C_PHILIPSPAR
+#ifdef CONFIG_I2C_BITLP
extern int i2c_bitlp_init(void);
#endif
-#ifdef CONFIG_I2C_ELV
+#ifdef CONFIG_I2C_BITELV
extern int i2c_bitelv_init(void);
#endif
-#ifdef CONFIG_I2C_VELLEMAN
+#ifdef CONFIG_I2C_BITVELLE
extern int i2c_bitvelle_init(void);
#endif
@@ -1301,5 +1300,5 @@
extern int i2c_algo_pcf_init(void);
#endif
-#ifdef CONFIG_I2C_ELEKTOR
+#ifdef CONFIG_I2C_PCFISA
extern int i2c_pcfisa_init(void);
#endif
@@ -1330,11 +1329,11 @@
i2c_algo_bit_init();
#endif
-#ifdef CONFIG_I2C_PHILIPSPAR
+#ifdef CONFIG_I2C_BITLP
i2c_bitlp_init();
#endif
-#ifdef CONFIG_I2C_ELV
+#ifdef CONFIG_I2C_BITELV
i2c_bitelv_init();
#endif
-#ifdef CONFIG_I2C_VELLEMAN
+#ifdef CONFIG_I2C_BITVELLE
i2c_bitvelle_init();
#endif
@@ -1344,5 +1343,5 @@
i2c_algo_pcf_init();
#endif
-#ifdef CONFIG_I2C_ELEKTOR
+#ifdef CONFIG_I2C_PCFISA
i2c_pcfisa_init();
#endif
--- linux-old/drivers/i2c/i2c-dev.c Tue Nov 13 00:31:41 CET 2001
+++ linux/drivers/i2c/i2c-dev.c Tue Nov 13 00:31:41 CET 2001
@@ -29,5 +29,5 @@
<[email protected]> */

-/* $Id: i2c-dev.c,v 1.40 2001/08/25 01:28:01 mds Exp $ */
+/* $Id: i2c-dev.c,v 1.43 2001/10/14 15:04:46 mds Exp $ */

#include <linux/config.h>
@@ -488,5 +487,5 @@
int res;

- printk("i2c-dev.o: i2c /dev entries driver module\n");
+ printk("i2c-dev.o: i2c /dev entries driver module version %s (%s)\n", I2C_VERSION, I2C_DATE);

i2cdev_initialized = 0;
--- linux-old/drivers/i2c/i2c-elektor.c Tue Nov 13 00:31:42 CET 2001
+++ linux/drivers/i2c/i2c-elektor.c Tue Nov 13 00:31:42 CET 2001
@@ -75,5 +74,6 @@
int address = ctl ? (base + 1) : base;

- if (ctl && irq) {
+ /* enable irq if any specified for serial operation */
+ if (ctl && irq && (val & I2C_PCF_ESO)) {
val |= I2C_PCF_ENI;
}
@@ -274,5 +274,5 @@
}

- printk("i2c-elektor.o: i2c pcf8584-isa adapter module\n");
+ printk("i2c-elektor.o: i2c pcf8584-isa adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);

if (base == 0) {
@@ -284,6 +284,8 @@
#endif
if (pcf_isa_init() == 0) {
- if (i2c_pcf_add_bus(&pcf_isa_ops) < 0)
+ if (i2c_pcf_add_bus(&pcf_isa_ops) < 0) {
+ pcf_isa_exit();
return -ENODEV;
+ }
} else {
return -ENODEV;
--- linux-old/drivers/i2c/i2c-elv.c Tue Nov 13 00:31:43 CET 2001
+++ linux/drivers/i2c/i2c-elv.c Tue Nov 13 00:31:43 CET 2001
@@ -22,5 +22,5 @@
Frodo Looijaard <[email protected]> */

-/* $Id: i2c-elv.c,v 1.17 2001/07/29 02:44:25 mds Exp $ */
+/* $Id: i2c-elv.c,v 1.20 2001/10/14 15:04:46 mds Exp $ */

#include <linux/kernel.h>
@@ -171,5 +169,5 @@
int __init i2c_bitelv_init(void)
{
- printk("i2c-elv.o: i2c ELV parallel port adapter module\n");
+ printk("i2c-elv.o: i2c ELV parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
if (base==0) {
/* probe some values */
--- linux-old/include/linux/i2c-id.h Tue Nov 13 00:31:43 CET 2001
+++ linux/include/linux/i2c-id.h Tue Nov 13 00:31:43 CET 2001
@@ -21,5 +21,5 @@
/* ------------------------------------------------------------------------- */

-/* $Id: i2c-id.h,v 1.35 2001/08/12 17:22:20 mds Exp $ */
+/* $Id: i2c-id.h,v 1.40 2001/11/11 22:16:33 mds Exp $ */

#ifndef I2C_ID_H
@@ -128,4 +128,7 @@
#define I2C_DRIVERID_IT87 1026
#define I2C_DRIVERID_CH700X 1027 /* single driver for CH7003-7009 digital pc to tv encoders */
+#define I2C_DRIVERID_FSCPOS 1028
+#define I2C_DRIVERID_FSCSCY 1029
+#define I2C_DRIVERID_PCF8591 1030

/*
@@ -144,5 +147,6 @@
#define I2C_ALGO_SAA7146 0x060000 /* SAA 7146 video decoder bus */
#define I2C_ALGO_ACB 0x070000 /* ACCESS.bus algorithm */
-
+#define I2C_ALGO_IIC 0x080000 /* ITE IIC bus */
+#define I2C_ALGO_SAA7134 0x090000
#define I2C_ALGO_EC 0x100000 /* ACPI embedded controller */

@@ -189,4 +193,7 @@
/* --- MPC8xx PowerPC adapters */
#define I2C_HW_MPC8XX_EPON 0x00 /* Eponymous MPC8xx I2C adapter */
+
+/* --- ITE based algorithms */
+#define I2C_HW_I_IIC 0x00 /* controller on the ITE */

/* --- SMBus only adapters */
--- linux-old/drivers/i2c/i2c-pcf8584.h Tue Nov 13 00:31:43 CET 2001
+++ linux/drivers/i2c/i2c-pcf8584.h Tue Nov 13 00:31:43 CET 2001
@@ -22,5 +22,5 @@
/* With some changes from Frodo Looijaard <[email protected]> */

-/* $Id: i2c-pcf8584.h,v 1.3 2000/01/18 23:54:07 frodo Exp $ */
+/* $Id: i2c-pcf8584.h,v 1.4 2001/10/02 00:07:37 mds Exp $ */

#ifndef I2C_PCF8584_H
--- linux-old/drivers/i2c/i2c-philips-par.c Tue Nov 13 00:31:44 CET 2001
+++ linux/drivers/i2c/i2c-philips-par.c Tue Nov 13 00:31:44 CET 2001
@@ -22,5 +22,5 @@
Frodo Looijaard <[email protected]> */

-/* $Id: i2c-philips-par.c,v 1.18 2000/07/06 19:21:49 frodo Exp $ */
+/* $Id: i2c-philips-par.c,v 1.21 2001/10/14 15:04:46 mds Exp $ */

#include <linux/kernel.h>
@@ -265,5 +264,5 @@
struct parport *port;
#endif
- printk("i2c-philips-par.o: i2c Philips parallel port adapter module\n");
+ printk("i2c-philips-par.o: i2c Philips parallel port adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);

#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,3,4)
--- linux-old/drivers/i2c/i2c-proc.c Tue Nov 13 00:31:46 CET 2001
+++ linux/drivers/i2c/i2c-proc.c Tue Nov 13 00:31:46 CET 2001
@@ -39,8 +39,4 @@
#include <linux/init.h>

-/* FIXME need i2c versioning */
-#define LM_DATE "20010825"
-#define LM_VERSION "2.6.1"
-
#ifndef THIS_MODULE
#define THIS_MODULE NULL
@@ -859,5 +853,5 @@
int __init sensors_init(void)
{
- printk("i2c-proc.o version %s (%s)\n", LM_VERSION, LM_DATE);
+ printk("i2c-proc.o version %s (%s)\n", I2C_VERSION, I2C_DATE);
i2c_initialized = 0;
if (!
@@ -904,3 +900,4 @@
return i2c_cleanup();
}
+
#endif /* MODULE */
--- linux-old/drivers/i2c/i2c-velleman.c Tue Nov 13 00:31:47 CET 2001
+++ linux/drivers/i2c/i2c-velleman.c Tue Nov 13 00:31:47 CET 2001
@@ -19,5 +19,5 @@
/* ------------------------------------------------------------------------- */

-/* $Id: i2c-velleman.c,v 1.19 2000/01/24 02:06:33 mds Exp $ */
+/* $Id: i2c-velleman.c,v 1.22 2001/10/14 15:04:46 mds Exp $ */

#include <linux/kernel.h>
@@ -161,5 +160,5 @@
int __init i2c_bitvelle_init(void)
{
- printk("i2c-velleman.o: i2c Velleman K8000 adapter module\n");
+ printk("i2c-velleman.o: i2c Velleman K8000 adapter module version %s (%s)\n", I2C_VERSION, I2C_DATE);
if (base==0) {
/* probe some values */
--- linux-old/drivers/i2c/Config.in Tue Nov 13 00:31:48 CET 2001
+++ linux/drivers/i2c/Config.in Tue Nov 13 00:31:48 CET 2001
@@ -11,20 +11,14 @@
dep_tristate 'I2C bit-banging interfaces' CONFIG_I2C_ALGOBIT $CONFIG_I2C
if [ "$CONFIG_I2C_ALGOBIT" != "n" ]; then
- dep_tristate ' Philips style parallel port adapter' CONFIG_I2C_PHILIPSPAR $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT
- dep_tristate ' ELV adapter' CONFIG_I2C_ELV $CONFIG_I2C_ALGOBIT
- dep_tristate ' Velleman K9000 adapter' CONFIG_I2C_VELLEMAN $CONFIG_I2C_ALGOBIT
+ dep_tristate ' Philips style parallel port adapter' CONFIG_I2C_BITLP $CONFIG_I2C_ALGOBIT $CONFIG_PARPORT
+ dep_tristate ' ELV adapter' CONFIG_I2C_BITELV $CONFIG_I2C_ALGOBIT
+ dep_tristate ' Velleman K9000 adapter' CONFIG_I2C_BITVELLE $CONFIG_I2C_ALGOBIT
fi

dep_tristate 'I2C PCF 8584 interfaces' CONFIG_I2C_ALGOPCF $CONFIG_I2C
if [ "$CONFIG_I2C_ALGOPCF" != "n" ]; then
- dep_tristate ' Elektor ISA card' CONFIG_I2C_ELEKTOR $CONFIG_I2C_ALGOPCF
+ dep_tristate ' Elektor ISA card' CONFIG_I2C_PCFISA $CONFIG_I2C_ALGOPCF
fi

- if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
- dep_tristate 'ITE I2C Algorithm' CONFIG_ITE_I2C_ALGO $CONFIG_I2C
- if [ "$CONFIG_ITE_I2C_ALGO" != "n" ]; then
- dep_tristate ' ITE I2C Adapter' CONFIG_ITE_I2C_ADAP $CONFIG_ITE_I2C_ALGO
- fi
- fi
if [ "$CONFIG_8xx" = "y" ]; then
dep_tristate 'MPC8xx CPM I2C interface' CONFIG_I2C_ALGO8XX $CONFIG_I2C
@@ -33,4 +27,5 @@
fi
fi
+
if [ "$CONFIG_405" = "y" ]; then
dep_tristate 'PPC 405 I2C Algorithm' CONFIG_I2C_PPC405_ALGO $CONFIG_I2C
@@ -44,4 +39,5 @@

dep_tristate 'I2C device interface' CONFIG_I2C_CHARDEV $CONFIG_I2C
+
dep_tristate 'I2C /proc interface (required for hardware sensors)' CONFIG_I2C_PROC $CONFIG_I2C

--- linux-old/drivers/i2c/Makefile Tue Nov 13 00:31:48 CET 2001
+++ linux/drivers/i2c/Makefile Tue Nov 13 00:31:48 CET 2001
@@ -5,17 +5,14 @@
O_TARGET := i2c.o

-export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o \
- i2c-algo-ite.o i2c-proc.o
+export-objs := i2c-core.o i2c-algo-bit.o i2c-algo-pcf.o i2c-proc.o

obj-$(CONFIG_I2C) += i2c-core.o
obj-$(CONFIG_I2C_CHARDEV) += i2c-dev.o
obj-$(CONFIG_I2C_ALGOBIT) += i2c-algo-bit.o
-obj-$(CONFIG_I2C_PHILIPSPAR) += i2c-philips-par.o
-obj-$(CONFIG_I2C_ELV) += i2c-elv.o
-obj-$(CONFIG_I2C_VELLEMAN) += i2c-velleman.o
+obj-$(CONFIG_I2C_BITLP) += i2c-philips-par.o
+obj-$(CONFIG_I2C_BITELV) += i2c-elv.o
+obj-$(CONFIG_I2C_BITVELLE) += i2c-velleman.o
obj-$(CONFIG_I2C_ALGOPCF) += i2c-algo-pcf.o
-obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
-obj-$(CONFIG_ITE_I2C_ALGO) += i2c-algo-ite.o
-obj-$(CONFIG_ITE_I2C_ADAP) += i2c-adap-ite.o
+obj-$(CONFIG_I2C_PCFISA) += i2c-elektor.o
obj-$(CONFIG_I2C_PROC) += i2c-proc.o

--- linux-old/Documentation/Configure.help Tue Nov 13 00:31:49 CET 2001
+++ linux/Documentation/Configure.help Tue Nov 13 00:31:49 CET 2001
@@ -16041,14 +16041,32 @@
unless you are absolutely sure.

+UltraSPARC-III bootbus i2c controller driver
+CONFIG_BBC_I2C
+ The BBC devices on the UltraSPARC III have two I2C controllers. The
+ first I2C controller connects mainly to configuration PROMs (NVRAM,
+ CPU configuration, DIMM types, etc.). The second I2C controller
+ connects to environmental control devices such as fans and
+ temperature sensors. The second controller also connects to the
+ smartcard reader, if present. Say Y to enable support for these.
+
+I2C /proc support
+CONFIG_I2C_PROC
+ This provides support for i2c device entries in the /proc filesystem.
+ The entries will be found in /proc/sys/dev/sensors.
+
+ This code is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
+ The module will be called i2c-proc.o.
+
I2C support
CONFIG_I2C
I2C (pronounce: I-square-C) is a slow serial bus protocol used in
- many micro controller applications and developed by Philips. SMBus,
- or System Management Bus is a subset of the I2C protocol. More
+ many micro controller applications and developed by Philips. SMBus,
+ or System Management Bus is a subset of the I2C protocol. More
information is contained in the directory <file:Documentation/i2c/>,
especially in the file called "summary" there.

Both I2C and SMBus are supported here. You will need this for
- hardware sensors support, and also for Video For Linux support.
+ hardware sensors support, and also for Video for Linux support.
Specifically, if you want to use a BT848 based frame grabber/overlay
boards under Linux, say Y here and also to "I2C bit-banging
@@ -16056,41 +16074,29 @@

If you want I2C support, you should say Y here and also to the
- specific driver for your bus adapter(s) below. If you say Y to
+ specific driver for your bus adapter(s) below. If you say Y to
"/proc file system" below, you will then get a /proc interface which
is documented in <file:Documentation/i2c/proc-interface>.

- This I2C support is also available as a module. If you want to
+ This I2C support is also available as a module. If you want to
compile it as a module, say M here and read
- <file:Documentation/modules.txt>.
- The module will be called i2c-core.o.
-
-UltraSPARC-III bootbus i2c controller driver
-CONFIG_BBC_I2C
- The BBC devices on the UltraSPARC III have two I2C controllers. The
- first I2C controller connects mainly to configuration PROMs (NVRAM,
- CPU configuration, DIMM types, etc.). The second I2C controller
- connects to environmental control devices such as fans and
- temperature sensors. The second controller also connects to the
- smartcard reader, if present. Say Y to enable support for these.
+ <file:Documentation/modules.txt>. The module will be called i2c-core.o.

I2C bit-banging interfaces
CONFIG_I2C_ALGOBIT
This allows you to use a range of I2C adapters called bit-banging
- adapters. Say Y if you own an I2C adapter belonging to this class
+ adapters. Say Y if you own an I2C adapter belonging to this class
and then say Y to the specific driver for you adapter below.

- This support is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ This support is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-algo-bit.o.

Philips style parallel port adapter
-CONFIG_I2C_PHILIPSPAR
- This supports parallel-port I2C adapters made by Philips. Say Y if
+CONFIG_I2C_BITLP
+ This supports parallel-port I2C adapters made by Philips. Say Y if
you own such an adapter.

- This driver is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ This driver is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-philips-par.o.

@@ -16099,21 +16105,19 @@

ELV adapter
-CONFIG_I2C_ELV
- This supports parallel-port I2C adapters called ELV. Say Y if you
+CONFIG_I2C_BITELV
+ This supports parallel-port I2C adapters called ELV. Say Y if you
own such an adapter.

- This driver is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ This driver is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-elv.o.

Velleman K9000 adapter
-CONFIG_I2C_VELLEMAN
- This supports the Velleman K9000 parallel-port I2C adapter. Say Y
- if you own such an adapter.
-
- This driver is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+CONFIG_I2C_BITVELLE
+ This supports the Velleman K9000 parallel-port I2C adapter. Say Y if
+ you own such an adapter.
+
+ This driver is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-velleman.o.

@@ -16124,17 +16128,15 @@
Y to the specific driver for you adapter below.

- This support is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ This support is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-algo-pcf.o.

Elektor ISA card
-CONFIG_I2C_ELEKTOR
- This supports the PCF8584 ISA bus I2C adapter. Say Y if you own
- such an adapter.
-
- This driver is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+CONFIG_I2C_PCFISA
+ This supports the PCF8584 ISA bus I2C adapter. Say Y if you own such
+ an adapter.
+
+ This driver is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-elektor.o.

@@ -16142,11 +16144,10 @@
CONFIG_I2C_CHARDEV
Say Y here to use i2c-* device files, usually found in the /dev
- directory on your system. They make it possible to have user-space
- programs use the I2C bus. Information on how to do this is
- contained in the file <file:Documentation/i2c/dev-interface>.
-
- This code is also available as a module. If you want to compile
- it as a module, say M here and read
- <file:Documentation/modules.txt>.
+ directory on your system. They make it possible to have user-space
+ programs use the I2C bus. Information on how to do this is contained
+ in the file <file:Documentation/i2c/dev-interface>.
+
+ This code is also available as a module. If you want to compile
+ it as a module, say M here and read <file:Documentation/modules.txt>.
The module will be called i2c-dev.o.



--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre3-beo #1 SMP Mon Nov 12 00:04:41 CET 2001 i686

2001-11-13 00:15:18

by Christoph Hellwig

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

In article <[email protected]> you wrote:
>
> This is an update-cleanup of the i2c code to the current CVS. In short,
> it adds version info printing and some CONFIG_ cleanups (there were
> CONFIG_ vars defined in Config.in that had been renamed inside the code).
> Please consider for next pre of 2.4.15.

Could you please think before doing a merge next time?
The patch backs out local changes like ite support:

> -obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
> -obj-$(CONFIG_ITE_I2C_ALGO) += i2c-algo-ite.o
> -obj-$(CONFIG_ITE_I2C_ADAP) += i2c-adap-ite.o
> +obj-$(CONFIG_I2C_PCFISA) += i2c-elektor.o
> obj-$(CONFIG_I2C_PROC) += i2c-proc.o

Christoph

--
Of course it doesn't work. We've performed a software upgrade.

2001-11-13 00:25:48

by J.A. Magallon

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


On 20011113 Christoph Hellwig wrote:
>In article <[email protected]> you wrote:
>>
>> This is an update-cleanup of the i2c code to the current CVS. In short,
>> it adds version info printing and some CONFIG_ cleanups (there were
>> CONFIG_ vars defined in Config.in that had been renamed inside the code).
>> Please consider for next pre of 2.4.15.
>
>Could you please think before doing a merge next time?
>The patch backs out local changes like ite support:
>
>> -obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
>> -obj-$(CONFIG_ITE_I2C_ALGO) += i2c-algo-ite.o
>> -obj-$(CONFIG_ITE_I2C_ADAP) += i2c-adap-ite.o
>> +obj-$(CONFIG_I2C_PCFISA) += i2c-elektor.o
>> obj-$(CONFIG_I2C_PROC) += i2c-proc.o
>

Sorry, did not know that. I just got the patch i2c auto-generates, and killed
things like '#ifdef MODULE_LICENSE' and so on.
Well, that are the mailing lists for....I make mistakes and someone catches them.

Thanks.

--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre3-beo #1 SMP Mon Nov 12 00:04:41 CET 2001 i686

2001-11-13 00:43:19

by J.A. Magallon

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


On 20011113 Christoph Hellwig wrote:
>In article <[email protected]> you wrote:
>>
>> This is an update-cleanup of the i2c code to the current CVS. In short,
>> it adds version info printing and some CONFIG_ cleanups (there were
>> CONFIG_ vars defined in Config.in that had been renamed inside the code).
>> Please consider for next pre of 2.4.15.
>
>Could you please think before doing a merge next time?
>The patch backs out local changes like ite support:
>
>> -obj-$(CONFIG_I2C_ELEKTOR) += i2c-elektor.o
>> -obj-$(CONFIG_ITE_I2C_ALGO) += i2c-algo-ite.o
>> -obj-$(CONFIG_ITE_I2C_ADAP) += i2c-adap-ite.o
>> +obj-$(CONFIG_I2C_PCFISA) += i2c-elektor.o
>> obj-$(CONFIG_I2C_PROC) += i2c-proc.o
>
> Christoph

This should also stay, so ?

- if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
- dep_tristate 'ITE I2C Algorithm' CONFIG_ITE_I2C_ALGO $CONFIG_I2C
- if [ "$CONFIG_ITE_I2C_ALGO" != "n" ]; then
- dep_tristate ' ITE I2C Adapter' CONFIG_ITE_I2C_ADAP $CONFIG_ITE_I2C_ALGO
- fi
- fi


--
J.A. Magallon # Let the source be with you...
mailto:[email protected]
Mandrake Linux release 8.2 (Cooker) for i586
Linux werewolf 2.4.15-pre4-beo #2 SMP Tue Nov 13 00:50:12 CET 2001 i686

2001-11-13 01:05:39

by Alan

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

> - */
> - return scsi_check_sense(SCpnt);
> + return SUCCESS;
> default:
> return FAILED;
> }
>
> Is really needed ?

I think so but its only for specific cases like shared busses

2001-11-13 05:17:53

by Keith Owens

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

drivers/net/bonding.c has #include <limits.h>, exposing the kernel to
user space dependencies. It must be removed.

I could not find a maintainer for this beast so cc'ed to seevral users
in the changelog.

2001-11-13 05:54:18

by NeilBrown

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Monday November 12, [email protected] wrote:
>
> Which means that I'd also like people to double-check that there are no
> embarrassing missing pieces due to the merge (or other patches).

I'm still lamenting the loss of the "-Werror" compile switch....

I compiled a fairly vanilla config, filtered the wheat from the chaff
and got:

agpgart_be.c:1533: warning: `intel_820_cleanup' defined but not used
lvm-snap.c: In function `lvm_snapshot_release':
lvm-snap.c:545: warning: unused variable `nbhs'
uhci.c:2986: warning: initialization discards qualifiers from pointer target type
dmi_scan.c:195: warning: `disable_ide_dma' defined but not used

The following patch removes these warnings. I suspect all parts are
correct, but *please* don't apply unless you (or someone else)
corroborate.

NeilBrown



--- ./drivers/char/agp/agpgart_be.c 2001/11/13 05:38:20 1.1
+++ ./drivers/char/agp/agpgart_be.c 2001/11/13 05:38:31
@@ -1529,6 +1529,7 @@
return;
}

+#if 0
static void intel_820_cleanup(void)
{
u8 temp;
@@ -1541,7 +1542,7 @@
pci_write_config_byte(agp_bridge.dev, INTEL_APSIZE,
previous_size->size_value);
}
-
+#endif

static int intel_820_configure(void)
{
--- ./drivers/usb/uhci.c 2001/11/13 05:41:32 1.1
+++ ./drivers/usb/uhci.c 2001/11/13 05:41:36
@@ -2968,7 +2968,7 @@
}
#endif

-static const struct pci_device_id __devinitdata uhci_pci_ids[] = { {
+static const struct pci_device_id uhci_pci_ids[] = { {

/* handle any USB UHCI controller */
class: ((PCI_CLASS_SERIAL_USB << 8) | 0x00),
--- ./drivers/md/lvm-snap.c 2001/11/13 05:35:39 1.1
+++ ./drivers/md/lvm-snap.c 2001/11/13 05:35:41
@@ -542,7 +542,6 @@

void lvm_snapshot_release(lv_t * lv)
{
- int nbhs = KIO_MAX_SECTORS;

if (lv->lv_block_exception)
{
--- ./arch/i386/kernel/dmi_scan.c 2001/11/13 05:42:55 1.1
+++ ./arch/i386/kernel/dmi_scan.c 2001/11/13 05:43:01
@@ -184,6 +184,7 @@
#define NO_MATCH { NONE, NULL}
#define MATCH(a,b) { a, b }

+#if 0
/*
* We have problems with IDE DMA on some platforms. In paticular the
* KT7 series. On these it seems the newer BIOS has fixed them. The
@@ -203,6 +204,7 @@
#endif
return 0;
}
+#endif

/*
* Reboot options and system auto-detection code provided by

2001-11-13 06:03:08

by Jeff Garzik

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

Neil Brown wrote:
> I'm still lamenting the loss of the "-Werror" compile switch....

Me too but the kernel won't build basic stuff in fs/*.c code on 64-bit
platforms with it enabled...

--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

2001-11-13 06:04:18

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

From: Neil Brown <[email protected]>
Date: Tue, 13 Nov 2001 16:54:00 +1100 (EST)

uhci.c:2986: warning: initialization discards qualifiers from pointer target type

The correct fix for this one is below and already sent
to Linus:

diff -u --recursive --new-file --exclude=CVS --exclude=.cvsignore vanilla/linux/include/linux/module.h linux/include/linux/module.h
--- vanilla/linux/include/linux/module.h Mon Nov 12 15:13:12 2001
+++ linux/include/linux/module.h Mon Nov 12 17:11:04 2001
@@ -317,7 +317,7 @@
* const, other exit data may be writable.
*/
#define MODULE_GENERIC_TABLE(gtype,name) \
-static struct gtype##_id * __module_##gtype##_table \
+static const struct gtype##_id * __module_##gtype##_table \
__attribute__ ((unused, __section__(".data.exit"))) = name

#ifndef __GENKSYMS__

2001-11-13 06:16:59

by Keith Owens

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Mon, 12 Nov 2001 22:03:41 -0800 (PST),
"David S. Miller" <[email protected]> wrote:
> From: Neil Brown <[email protected]>
> Date: Tue, 13 Nov 2001 16:54:00 +1100 (EST)
>
> uhci.c:2986: warning: initialization discards qualifiers from pointer target type
>
>The correct fix for this one is below and already sent
>to Linus:
>
>diff -u --recursive --new-file --exclude=CVS --exclude=.cvsignore vanilla/linux/include/linux/module.h linux/include/linux/module.h
>--- vanilla/linux/include/linux/module.h Mon Nov 12 15:13:12 2001
>+++ linux/include/linux/module.h Mon Nov 12 17:11:04 2001
>@@ -317,7 +317,7 @@
> * const, other exit data may be writable.
> */
> #define MODULE_GENERIC_TABLE(gtype,name) \
>-static struct gtype##_id * __module_##gtype##_table \
>+static const struct gtype##_id * __module_##gtype##_table \
> __attribute__ ((unused, __section__(".data.exit"))) = name
>
> #ifndef __GENKSYMS__

That breaks objects which have other __section__(".data.exit") info
which is not marked const. I put a comment just above that change...

2001-11-13 06:18:49

by Keith Owens

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

Ignore previous mail, the pointer cannot be const, the structure it
points to can be.

2001-11-13 06:24:30

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

From: Keith Owens <[email protected]>
Date: Tue, 13 Nov 2001 17:16:26 +1100

That breaks objects which have other __section__(".data.exit") info
which is not marked const. I put a comment just above that change...

Then change the other definition of that macro to
_NOT_ be const, and then fixup each and every driver
to drop the const directive in their table declaration.

As it stands the two version of that macro are totally
inconsistent.

2001-11-13 07:44:06

by Christoph Hellwig

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Tue, Nov 13, 2001 at 01:42:48AM +0100, J . A . Magallon wrote:
> This should also stay, so ?
>
> - if [ "$CONFIG_MIPS_ITE8172" = "y" ]; then
> - dep_tristate 'ITE I2C Algorithm' CONFIG_ITE_I2C_ALGO $CONFIG_I2C
> - if [ "$CONFIG_ITE_I2C_ALGO" != "n" ]; then
> - dep_tristate ' ITE I2C Adapter' CONFIG_ITE_I2C_ADAP $CONFIG_ITE_I2C_ALGO
> - fi
> - fi

*nod* - maybe someone should merge that driver into CVS..

Christoph

--
Of course it doesn't work. We've performed a software upgrade.

2001-11-13 08:17:53

by Jeff Garzik

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

"David S. Miller" wrote:
>
> From: Keith Owens <[email protected]>
> Date: Tue, 13 Nov 2001 17:16:26 +1100
>
> That breaks objects which have other __section__(".data.exit") info
> which is not marked const. I put a comment just above that change...
>
> Then change the other definition of that macro to
> _NOT_ be const, and then fixup each and every driver
> to drop the const directive in their table declaration.

...and after all that work is done, change the PCI API in a stable
series. :)

grep const include/linux/pci.h

--
Jeff Garzik | Only so many songs can be sung
Building 1024 | with two lips, two lungs, and one tongue.
MandrakeSoft | - nomeansno

2001-11-13 09:33:58

by Alan

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

> Neil Brown wrote:
> > I'm still lamenting the loss of the "-Werror" compile switch....
>
> Me too but the kernel won't build basic stuff in fs/*.c code on 64-bit
> platforms with it enabled...

Or some 32bit setups, in part because gcc isnt always very bright about
warnings on non-use of variables. I'd rather have a small number of expected
warnings than a pile of ifdefs and = 0 assignments that later mask a real
bug

2001-11-13 10:43:47

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

From: Keith Owens <[email protected]>
Date: Tue, 13 Nov 2001 16:17:18 +1100

drivers/net/bonding.c has #include <limits.h>, exposing the kernel to
user space dependencies. It must be removed.

I could not find a maintainer for this beast so cc'ed to seevral users
in the changelog.

Documentation/networking/bonding.txt says:

Current developement on this driver is posted to:
- http://www.sourceforge.net/projects/bonding/

But I've made the fix and sent it off to Linus for you :)

Franks a lot,
David S. Miller
[email protected]

2001-11-13 11:15:43

by Christoph Rohland

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

Hi Trever,

On 12 Nov 2001, Trever L. Adams wrote:
> Red Hat mounts /dev/shm as tmpfs instead of shmfs. From what I can
> tell this is accurate.

That's OK.

> However since the beginning of the new VM, it seems that shmfs/tmpfs
> leaks memory.

??? I did not get _one_ single bug report.

Greetings
Christoph


2001-11-13 13:13:14

by Andrey Savochkin

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Mon, Nov 12, 2001 at 03:10:01PM -0600, Robert Cantu wrote:
>
> pre4:
> --snip--
> - Andrey Savochkin/Andrew Morton: eepro100 config space save/restore over suspend
> --snip--
>
> My eepro100 mini-pci card on my laptop currently doesn't handle sleep/suspend very well
> for me and needs a reboot to work again. mii-diag output gives wierd data such as
> the MAC address set to ff:ff:ff:ff:ff:ff. Looking at the patch code, it seems that
> pci_save_state() and pci_restore_state(), among other things, implements this.
> Will this work with APM's suspend/sleep functions?

It has better chances to work now.

Andrey

2001-11-13 14:10:51

by Horst H. von Brand

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On CVS as of today for sparc64 I get:

sparc64-linux-gcc -D__KERNEL__ -I/usr/src/linux-2.4/include -Wall -Wstrict-proto
types -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -
m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -f
call-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -c -o ioctl32.o ioctl32.
c
ioctl32.c: In function `do_lvm_ioctl':
ioctl32.c:2636: warning: assignment makes pointer from integer without a cast
ioctl32.c:2670: structure has no member named `inode'
ioctl32.c:2711: warning: assignment from incompatible pointer type
ioctl32.c:2712: structure has no member named `inode'
ioctl32.c:2719: structure has no member named `inode'
ioctl32.c:2732: structure has no member named `inode'
ioctl32.c:2611: warning: `v' might be used uninitialized in this function
make[1]: *** [ioctl32.o] Error 1
make[1]: Leaving directory `/usr/src/linux-2.4/arch/sparc64/kernel'
make: *** [_dir_arch/sparc64/kernel] Error 2
--
Dr. Horst H. von Brand Usuario #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

2001-11-13 15:21:55

by Thorsten Kukuk

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Tue, Nov 13, Horst von Brand wrote:

> On CVS as of today for sparc64 I get:
>
> sparc64-linux-gcc -D__KERNEL__ -I/usr/src/linux-2.4/include -Wall -Wstrict-proto
> types -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common -
> m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5 -f
> call-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -c -o ioctl32.o ioctl32.
> c
> ioctl32.c: In function `do_lvm_ioctl':
> ioctl32.c:2636: warning: assignment makes pointer from integer without a cast
> ioctl32.c:2670: structure has no member named `inode'
> ioctl32.c:2711: warning: assignment from incompatible pointer type
> ioctl32.c:2712: structure has no member named `inode'
> ioctl32.c:2719: structure has no member named `inode'
> ioctl32.c:2732: structure has no member named `inode'
> ioctl32.c:2611: warning: `v' might be used uninitialized in this function
> make[1]: *** [ioctl32.o] Error 1
> make[1]: Leaving directory `/usr/src/linux-2.4/arch/sparc64/kernel'
> make: *** [_dir_arch/sparc64/kernel] Error 2

Please try the both attached patches. I'm using them with
2.4.15pre1aa1 (which has the same lvm version as now 2.2.15pre4).

Thorsten

--
Thorsten Kukuk http://www.suse.de/~kukuk/ [email protected]
SuSE GmbH Deutschherrenstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B


Attachments:
(No filename) (1.45 kB)
61_sparc64.lvm.diff (1.79 kB)
61_sparc64.lvm-1.0.1-rc2.diff (1.79 kB)
Download all attachments

2001-11-13 15:37:51

by Russell King

[permalink] [raw]
Subject: [PATCH] Re: Linux 2.4.15-pre4 - merge with Alan

The pesky linux/irq.h include found its way back into drivers/char/vt.c
again (maybe Alan didn't merge it).

linux/irq.h is not required by vt.c, and, since it includes asm/hw_irq.h
which architectures many not provide, generic code should not be including
this file in the first place.

Here's a patch to fix this bogosity up:

--- orig/drivers/char/vt.c Thu Nov 8 17:47:59 2001
+++ linux/drivers/char/vt.c Tue Nov 13 15:24:21 2001
@@ -24,7 +24,6 @@
#include <linux/major.h>
#include <linux/fs.h>
#include <linux/console.h>
-#include <linux/irq.h>

#include <asm/io.h>
#include <asm/uaccess.h>

--
Russell King ([email protected]) The developer of ARM Linux
http://www.arm.linux.org.uk/personal/aboutme.html

2001-11-13 16:26:32

by Chad N. Tindel

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

> drivers/net/bonding.c has #include <limits.h>, exposing the kernel to
> user space dependencies. It must be removed.
>
> I could not find a maintainer for this beast so cc'ed to seevral users
> in the changelog.

Thanks for the message. I just noticed that the bonding patch had been
included in 2.4.15-pre3. I hadn't realized Alan was going to integrate
it yet! I'm happy he did though. I have a patch which addresses that
issue and some race conditions which I'll send out immediately.

Chad

--
Chad N. Tindel <[email protected]>
Software Engineer
Hewlett Packard, Cupertino
(408) 447-4230

2001-11-13 16:58:13

by Chad N. Tindel

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Tue, 2001-11-13 at 09:27, Chad N. Tindel wrote:
> > drivers/net/bonding.c has #include <limits.h>, exposing the kernel to
> > user space dependencies. It must be removed.
> >
> > I could not find a maintainer for this beast so cc'ed to seevral users
> > in the changelog.

Here's a bonding patch against 2.4.15-pre4 which:

1. removes the limits.h include
2. fixes the compiler warning about #include <linux/malloc.h>
3. Fixes several SMP race conditions
4. Fixes a deadlock when hotswapping an enslaved ethernet device

I wasn't sure whether or not to send it to Linus, Alan, or lk so I sent
it to all 3.

So that everybody on the list knows, there's a lot of changes that just
went into the bonding driver. These have been accumulating over time as
people from IBM, HP, Fujitsu, Monta Vista, and other companies have been
working on enhancements in the High Availability area. I suggest any
interested parties read Documentation/networking/bonding.txt.

Also, this bonding driver *SHOULD* be backwards compatible with the old
one--- meaning you shouldn't need to recompile ifenslave or pass any
module parameters unless you want to use any of the new features.
However, if anybody has any problems with this, please email
[email protected]. Patches will also be accepted. :)
The new ifenslave is also available in
Documentation/networking/ifenslave.c, if you want to use it.

Chad

--
Chad N. Tindel <[email protected]>
Software Engineer
Hewlett Packard, Cupertino
(408) 447-4230


Attachments:
bonding-2.4.15-pre4-20011113 (11.59 kB)

2001-11-14 04:58:30

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan


This first patch is wrong. lv_block_exception needs translating
because the types are of a different size on sparc32 than on sparc64.

Specifically the first member of lv_block_exception_t is
'struct list_head', which are two pointers, which is 8 bytes
on sparc32 and 16 bytes on sparc64.

Please do not apply these patches.

Franks a lot,
David S. Miller
[email protected]

2001-11-14 06:29:19

by Thorsten Kukuk

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

On Tue, Nov 13, David S. Miller wrote:

>
> This first patch is wrong. lv_block_exception needs translating
> because the types are of a different size on sparc32 than on sparc64.
>
> Specifically the first member of lv_block_exception_t is
> 'struct list_head', which are two pointers, which is 8 bytes
> on sparc32 and 16 bytes on sparc64.
>
> Please do not apply these patches.

If the first one should be wrong, why not apply the second one ?
Or I'm missing something ?
To the first patch: Without it you will always get a kernel oops
in this part of ioctl32.c

Thorsten

--
Thorsten Kukuk http://www.suse.de/~kukuk/ [email protected]
SuSE GmbH Deutschherrenstr. 15-19 D-90429 Nuernberg
--------------------------------------------------------------------
Key fingerprint = A368 676B 5E1B 3E46 CFCE 2D97 F8FD 4E23 56C6 FB4B

2001-11-14 06:32:29

by David Miller

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

From: Thorsten Kukuk <[email protected]>
Date: Wed, 14 Nov 2001 07:28:52 +0100

If the first one should be wrong, why not apply the second one ?
Or I'm missing something ?
To the first patch: Without it you will always get a kernel oops
in this part of ioctl32.c

Please try this patch instead. I just cleaned up all of this code.

--- ../vanilla/linux/arch/sparc64/kernel/ioctl32.c Mon Nov 12 15:13:04 2001
+++ arch/sparc64/kernel/ioctl32.c Tue Nov 13 22:14:45 2001
@@ -2403,6 +2421,7 @@
u32 pv[ABS_MAX_PV + 1];
u32 lv[ABS_MAX_LV + 1];
uint8_t vg_uuid[UUID_LEN+1]; /* volume group UUID */
+ uint8_t dummy1[200];
} vg32_t;

typedef struct {
@@ -2444,7 +2463,7 @@
} lv_status_byindex_req32_t;

typedef struct {
- dev_t dev;
+ __kernel_dev_t32 dev;
u32 lv;
} lv_status_bydev_req32_t;

@@ -2517,7 +2536,8 @@
lv_block_exception32_t *lbe32;
lv_block_exception_t *lbe;
lv32_t *ul = (lv32_t *)A(p);
- lv_t *l = (lv_t *)kmalloc(sizeof(lv_t), GFP_KERNEL);
+ lv_t *l = (lv_t *) kmalloc(sizeof(lv_t), GFP_KERNEL);
+
if (!l) {
*errp = -ENOMEM;
return NULL;
@@ -2547,12 +2567,11 @@
if (l->lv_block_exception) {
lbe32 = (lv_block_exception32_t *)A(ptr2);
memset(lbe, 0, size);
- for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) {
- err |= get_user(lbe->rsector_org, &lbe32->rsector_org);
- err |= __get_user(lbe->rdev_org, &lbe32->rdev_org);
- err |= __get_user(lbe->rsector_new, &lbe32->rsector_new);
- err |= __get_user(lbe->rdev_new, &lbe32->rdev_new);
-
+ for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) {
+ err |= get_user(lbe->rsector_org, &lbe32->rsector_org);
+ err |= __get_user(lbe->rdev_org, &lbe32->rdev_org);
+ err |= __get_user(lbe->rsector_new, &lbe32->rsector_new);
+ err |= __get_user(lbe->rdev_new, &lbe32->rdev_new);
}
}
}
@@ -2590,7 +2609,7 @@

static int do_lvm_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg)
{
- vg_t *v;
+ vg_t *v = NULL;
union {
lv_req_t lv_req;
le_remap_req_t le_remap;
@@ -2608,17 +2627,22 @@
switch (cmd) {
case VG_STATUS:
v = kmalloc(sizeof(vg_t), GFP_KERNEL);
- if (!v) return -ENOMEM;
+ if (!v)
+ return -ENOMEM;
karg = v;
break;
+
+ case VG_CREATE_OLD:
case VG_CREATE:
v = kmalloc(sizeof(vg_t), GFP_KERNEL);
- if (!v) return -ENOMEM;
- if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc) ||
- __get_user(v->proc, &((vg32_t *)arg)->proc)) {
+ if (!v)
+ return -ENOMEM;
+ if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc)) {
kfree(v);
return -EFAULT;
}
+ /* 'proc' field is unused, just NULL it out. */
+ v->proc = NULL;
if (copy_from_user(v->vg_uuid, ((vg32_t *)arg)->vg_uuid, UUID_LEN+1)) {
kfree(v);
return -EFAULT;
@@ -2630,39 +2654,46 @@
return -EPERM;
for (i = 0; i < v->pv_max; i++) {
err = __get_user(ptr, &((vg32_t *)arg)->pv[i]);
- if (err) break;
+ if (err)
+ break;
if (ptr) {
v->pv[i] = kmalloc(sizeof(pv_t), GFP_KERNEL);
if (!v->pv[i]) {
err = -ENOMEM;
break;
}
- err = copy_from_user(v->pv[i], (void *)A(ptr), sizeof(pv32_t) - 8 - UUID_LEN+1);
+ err = copy_from_user(v->pv[i], (void *)A(ptr),
+ sizeof(pv32_t) - 8 - UUID_LEN+1);
if (err) {
err = -EFAULT;
break;
}
- err = copy_from_user(v->pv[i]->pv_uuid, ((pv32_t *)A(ptr))->pv_uuid, UUID_LEN+1);
+ err = copy_from_user(v->pv[i]->pv_uuid,
+ ((pv32_t *)A(ptr))->pv_uuid,
+ UUID_LEN+1);
if (err) {
err = -EFAULT;
break;
}

-
- v->pv[i]->pe = NULL; v->pv[i]->inode = NULL;
+ v->pv[i]->pe = NULL;
+ v->pv[i]->bd = NULL;
}
}
if (!err) {
for (i = 0; i < v->lv_max; i++) {
err = __get_user(ptr, &((vg32_t *)arg)->lv[i]);
- if (err) break;
+ if (err)
+ break;
if (ptr) {
v->lv[i] = get_lv_t(ptr, &err);
- if (err) break;
+ if (err)
+ break;
}
}
}
break;
+
case LV_CREATE:
case LV_EXTEND:
case LV_REDUCE:
@@ -2670,54 +2701,70 @@
case LV_RENAME:
case LV_STATUS_BYNAME:
err = copy_from_user(&u.pv_status, arg, sizeof(u.pv_status.pv_name));
- if (err) return -EFAULT;
+ if (err)
+ return -EFAULT;
if (cmd != LV_REMOVE) {
err = __get_user(ptr, &((lv_req32_t *)arg)->lv);
- if (err) return err;
+ if (err)
+ return err;
u.lv_req.lv = get_lv_t(ptr, &err);
} else
u.lv_req.lv = NULL;
break;

-
case LV_STATUS_BYINDEX:
- err = get_user(u.lv_byindex.lv_index, &((lv_status_byindex_req32_t *)arg)->lv_index);
+ err = get_user(u.lv_byindex.lv_index,
+ &((lv_status_byindex_req32_t *)arg)->lv_index);
err |= __get_user(ptr, &((lv_status_byindex_req32_t *)arg)->lv);
- if (err) return err;
+ if (err)
+ return err;
u.lv_byindex.lv = get_lv_t(ptr, &err);
break;
+
case LV_STATUS_BYDEV:
err = get_user(u.lv_bydev.dev, &((lv_status_bydev_req32_t *)arg)->dev);
+ err |= __get_user(ptr, &((lv_status_bydev_req32_t *)arg)->lv);
+ if (err)
+ return err;
u.lv_bydev.lv = get_lv_t(ptr, &err);
- if (err) return err;
- u.lv_bydev.lv = &p;
- p.pe = NULL; p.inode = NULL;
- break;
+ break;
+
case VG_EXTEND:
err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1);
- if (err) return -EFAULT;
+ if (err)
+ return -EFAULT;
err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1);
- if (err) return -EFAULT;
- p.pe = NULL; p.inode = NULL;
+ if (err)
+ return -EFAULT;
+ p.pe = NULL;
+ p.bd = NULL;
karg = &p;
break;
+
case PV_CHANGE:
case PV_STATUS:
err = copy_from_user(&u.pv_status, arg, sizeof(u.lv_req.lv_name));
- if (err) return -EFAULT;
+ if (err)
+ return -EFAULT;
err = __get_user(ptr, &((pv_status_req32_t *)arg)->pv);
- if (err) return err;
+ if (err)
+ return err;
u.pv_status.pv = &p;
if (cmd == PV_CHANGE) {
- err = copy_from_user(&p, (void *)A(ptr), sizeof(pv32_t) - 8 - UUID_LEN+1);
- if (err) return -EFAULT;
- p.pe = NULL; p.inode = NULL;
+ err = copy_from_user(&p, (void *)A(ptr),
+ sizeof(pv32_t) - 8 - UUID_LEN+1);
+ if (err)
+ return -EFAULT;
+ p.pe = NULL;
+ p.bd = NULL;
}
break;
- }
+ };
+
old_fs = get_fs(); set_fs (KERNEL_DS);
err = sys_ioctl (fd, cmd, (unsigned long)karg);
set_fs (old_fs);
+
switch (cmd) {
case VG_STATUS:
if (!err) {
@@ -2730,42 +2777,60 @@
}
kfree(v);
break;
+
+ case VG_CREATE_OLD:
case VG_CREATE:
- for (i = 0; i < v->pv_max; i++)
- if (v->pv[i]) kfree(v->pv[i]);
- for (i = 0; i < v->lv_max; i++)
- if (v->lv[i]) put_lv_t(v->lv[i]);
+ for (i = 0; i < v->pv_max; i++) {
+ if (v->pv[i])
+ kfree(v->pv[i]);
+ }
+ for (i = 0; i < v->lv_max; i++) {
+ if (v->lv[i])
+ put_lv_t(v->lv[i]);
+ }
kfree(v);
break;
+
case LV_STATUS_BYNAME:
- if (!err && u.lv_req.lv) err = copy_lv_t(ptr, u.lv_req.lv);
+ if (!err && u.lv_req.lv)
+ err = copy_lv_t(ptr, u.lv_req.lv);
/* Fall through */
+
case LV_CREATE:
case LV_EXTEND:
case LV_REDUCE:
- if (u.lv_req.lv) put_lv_t(u.lv_req.lv);
+ if (u.lv_req.lv)
+ put_lv_t(u.lv_req.lv);
break;
+
case LV_STATUS_BYINDEX:
if (u.lv_byindex.lv) {
- if (!err) err = copy_lv_t(ptr, u.lv_byindex.lv);
+ if (!err)
+ err = copy_lv_t(ptr, u.lv_byindex.lv);
put_lv_t(u.lv_byindex.lv);
}
break;
+
+ case LV_STATUS_BYDEV:
+ if (u.lv_bydev.lv) {
+ if (!err)
+ err = copy_lv_t(ptr, u.lv_bydev.lv);
+ put_lv_t(u.lv_byindex.lv);
+ }
+ break;
+
case PV_STATUS:
if (!err) {
err = copy_to_user((void *)A(ptr), &p, sizeof(pv32_t) - 8 - UUID_LEN+1);
- if (err) return -EFAULT;
+ if (err)
+ return -EFAULT;
err = copy_to_user(((pv_t *)A(ptr))->pv_uuid, p.pv_uuid, UUID_LEN + 1);
- if (err) return -EFAULT;
+ if (err)
+ return -EFAULT;
}
break;
- case LV_STATUS_BYDEV:
- if (!err) {
- if (!err) err = copy_lv_t(ptr, u.lv_bydev.lv);
- put_lv_t(u.lv_byindex.lv);
- }
- break;
- }
+ };
+
return err;
}
#endif
@@ -4646,6 +4713,7 @@
HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl)
#if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE)
HANDLE_IOCTL(VG_STATUS, do_lvm_ioctl)
+HANDLE_IOCTL(VG_CREATE_OLD, do_lvm_ioctl)
HANDLE_IOCTL(VG_CREATE, do_lvm_ioctl)
HANDLE_IOCTL(VG_EXTEND, do_lvm_ioctl)
HANDLE_IOCTL(LV_CREATE, do_lvm_ioctl)
@@ -4655,6 +4723,7 @@
HANDLE_IOCTL(LV_RENAME, do_lvm_ioctl)
HANDLE_IOCTL(LV_STATUS_BYNAME, do_lvm_ioctl)
HANDLE_IOCTL(LV_STATUS_BYINDEX, do_lvm_ioctl)
+HANDLE_IOCTL(LV_STATUS_BYDEV, do_lvm_ioctl)
HANDLE_IOCTL(PV_CHANGE, do_lvm_ioctl)
HANDLE_IOCTL(PV_STATUS, do_lvm_ioctl)
#endif /* LVM */

2001-11-14 12:59:43

by Horst H. von Brand

[permalink] [raw]
Subject: Re: Linux 2.4.15-pre4 - merge with Alan

Thorsten Kukuk <[email protected]> said:
> On Tue, Nov 13, Horst von Brand wrote:
>
> > On CVS as of today for sparc64 I get:
> >
> > sparc64-linux-gcc -D__KERNEL__ -I/usr/src/linux-2.4/include -Wall -Wstrict-pr
> oto
> > types -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-commo
> n -
> > m64 -pipe -mno-fpu -mcpu=ultrasparc -mcmodel=medlow -ffixed-g4 -fcall-used-g5
> -f
> > call-used-g7 -Wno-sign-compare -Wa,--undeclared-regs -c -o ioctl32.o ioctl
> 32.
> > c
> > ioctl32.c: In function `do_lvm_ioctl':
> > ioctl32.c:2636: warning: assignment makes pointer from integer without a cast
> > ioctl32.c:2670: structure has no member named `inode'
> > ioctl32.c:2711: warning: assignment from incompatible pointer type
> > ioctl32.c:2712: structure has no member named `inode'
> > ioctl32.c:2719: structure has no member named `inode'
> > ioctl32.c:2732: structure has no member named `inode'
> > ioctl32.c:2611: warning: `v' might be used uninitialized in this function
> > make[1]: *** [ioctl32.o] Error 1
> > make[1]: Leaving directory `/usr/src/linux-2.4/arch/sparc64/kernel'
> > make: *** [_dir_arch/sparc64/kernel] Error 2
>
> Please try the both attached patches. I'm using them with
> 2.4.15pre1aa1 (which has the same lvm version as now 2.2.15pre4).

Whatever patches went into CVS since yesterday fixed that one (in a
different way).

Thanks!
--
Dr. Horst H. von Brand Usuario #22616 counter.li.org
Departamento de Informatica Fono: +56 32 654431
Universidad Tecnica Federico Santa Maria +56 32 654239
Casilla 110-V, Valparaiso, Chile Fax: +56 32 797513

2001-11-15 09:25:57

by Martin Persson

[permalink] [raw]
Subject: Problem with Linux 2.4.15-pre4 on an IBM ThinkPad

Ok, I've got the thing moving after applying Linus patch. It even
solved the annoying problem I had with having to eject and insert my
Xircom-card to make it work properly with Linux after boot (I just got
the beep-boop-response when the computer tried to initialize pcmcia at
boot). It also solves the problem that the kernel panicked while
trying to mount the root after a warm reboot.

However (there's always a however), now I have other problems with my
laptop. The network comes right up and everything works just fine,
except when I try to scp files on a few Mbytes from the laptop. When I
try that, sometimes the scp just works nicely up to 99% where it
stalls, sometimes it continues after a few seconds, sometimes it
stalls infinitely (or at least for more than 10 minutes, I interrupted
it). Typical like this:

test.foo 100% |*****************************| 4222 KB 00:11
test.bar 99% |**************************** | 3364 KB - stalled -

I can reproduce it. Interesting enough, it only seems to appear when I
scp from the sshd on the laptop with a client on my workstation. If I
scp to the laptop from my workstation or run scp on my laptop against
the sshd on the workstation (any direction), things seems to work just
fine. This does not happen under the 2.4.9-kernel I used before (I've
double-checked).

ssh-version on the workstation is openssh-2.2.0p1-2 and on the laptop
it's pure ancient (ssh-1.2.27-5i). It never connects outside firewalls
anyway (bad excuse, I know).

Another problem I have is that the kernel doesn't seem to be able to
power down the laptop at halt. It did it just perfectly under 2.2, has
done it stocastically under 2.4.9, but 2.4.15pre4 doesn't seem able to
do it at all. My Win98 (double boot) is however quite capable to shut
down the machine. APM is set to:

CONFIG_PM=y
# CONFIG_ACPI is not set
CONFIG_APM=y
# CONFIG_APM_IGNORE_USER_SUSPEND is not set
CONFIG_APM_DO_ENABLE=y
CONFIG_APM_CPU_IDLE=y
CONFIG_APM_DISPLAY_BLANK=y
CONFIG_APM_RTC_IS_GMT=y
# CONFIG_APM_ALLOW_INTS is not set
CONFIG_APM_REAL_MODE_POWER_OFF=y

The REAL_MODE_POWER_OFF is set just as an experiment to see if it
improved things. It did not. The same setup (minus the
REAL_MODE_POWER_OFF) works so-so with the 2.4.9.

The machine is an IBM ThinkPad 570 (the one with a PII on 333 MHz),
the PCcard is a Xircom Cardbus Combicard with 10/100 TP and 56 kbit
modem and I'm using the new driver out of curiousity.

Finally, more curiousity: What is kapm-idled? I've never heard about
it before, so I got quite curious when I saw that my laptop suddenly
never were idle.

2001-11-15 12:11:42

by Keith Owens

[permalink] [raw]
Subject: Re: Problem with Linux 2.4.15-pre4 on an IBM ThinkPad

On 15 Nov 2001 10:25:34 +0100,
Martin Persson <[email protected]> wrote:
>However (there's always a however), now I have other problems with my
>laptop. The network comes right up and everything works just fine,
>except when I try to scp files on a few Mbytes from the laptop. When I
>try that, sometimes the scp just works nicely up to 99% where it
>stalls, sometimes it continues after a few seconds, sometimes it
>stalls infinitely (or at least for more than 10 minutes, I interrupted
>it).

I would suspect the Xircom driver (RBEM56G, right?). I have similar
symptoms with RBEM56G in a Compaq laptop, ssh hangs during bulk
transfers and is sensitive to which direction the transfer was started.
"ifconfig eth0 -promisc" a few times will usually restart the transfer,
sometimes it takes "/etc/rc.d/init.d/pcmcia restart" to fix the
problem, then wait until TCP retransmission picks up again.

I don't believe ssh is at fault, it just causes the right set of
activity to trip the driver problem. ifconfig eth0 -promisc reloads
CSR6 on the card and the problem goes away, without me touching the ssh
transfers.

This was on my list of problems to debug (after modutils, kdb, xfs,
kbuild 2.5, ...) but I managed to trip over the Ethernet cable and
completely broke the card. The Realport cards are more resilient than
most PCMCIA network cards but they have their limits.