Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 19:37:45 +0000 (11:37 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 11 Feb 2007 19:37:45 +0000 (11:37 -0800)
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6:
  [SPARC64]: Update defconfig.
  [SPARC64]: Add PCI MSI support on Niagara.
  [SPARC64] IRQ: Use irq_desc->chip_data instead of irq_desc->handler_data
  [SPARC64]: Add obppath sysfs attribute for SBUS and PCI devices.
  [PARTITION]: Add whole_disk attribute.

1  2 
fs/partitions/msdos.c
include/linux/genhd.h

diff --combined fs/partitions/msdos.c
@@@ -63,25 -63,15 +63,25 @@@ msdos_magic_present(unsigned char *p
  #define AIX_LABEL_MAGIC4      0xC1
  static int aix_magic_present(unsigned char *p, struct block_device *bdev)
  {
 +      struct partition *pt = (struct partition *) (p + 0x1be);
        Sector sect;
        unsigned char *d;
 -      int ret = 0;
 +      int slot, ret = 0;
  
 -      if (p[0] != AIX_LABEL_MAGIC1 &&
 -              p[1] != AIX_LABEL_MAGIC2 &&
 -              p[2] != AIX_LABEL_MAGIC3 &&
 -              p[3] != AIX_LABEL_MAGIC4)
 +      if (!(p[0] == AIX_LABEL_MAGIC1 &&
 +              p[1] == AIX_LABEL_MAGIC2 &&
 +              p[2] == AIX_LABEL_MAGIC3 &&
 +              p[3] == AIX_LABEL_MAGIC4))
                return 0;
 +      /* Assume the partition table is valid if Linux partitions exists */
 +      for (slot = 1; slot <= 4; slot++, pt++) {
 +              if (pt->sys_ind == LINUX_SWAP_PARTITION ||
 +                      pt->sys_ind == LINUX_RAID_PARTITION ||
 +                      pt->sys_ind == LINUX_DATA_PARTITION ||
 +                      pt->sys_ind == LINUX_LVM_PARTITION ||
 +                      is_extended_partition(pt))
 +                      return 0;
 +      }
        d = read_dev_sector(bdev, 7, &sect);
        if (d) {
                if (d[0] == '_' && d[1] == 'L' && d[2] == 'V' && d[3] == 'M')
@@@ -165,7 -155,7 +165,7 @@@ parse_extended(struct parsed_partition
  
                        put_partition(state, state->next, next, size);
                        if (SYS_IND(p) == LINUX_RAID_PARTITION)
-                               state->parts[state->next].flags = 1;
+                               state->parts[state->next].flags = ADDPART_FLAG_RAID;
                        loopct = 0;
                        if (++state->next == state->limit)
                                goto done;
diff --combined include/linux/genhd.h
@@@ -20,9 -20,9 +20,11 @@@ enum 
        LINUX_EXTENDED_PARTITION = 0x85,
        WIN98_EXTENDED_PARTITION = 0x0f,
  
+       SUN_WHOLE_DISK = DOS_EXTENDED_PARTITION,
        LINUX_SWAP_PARTITION = 0x82,
 +      LINUX_DATA_PARTITION = 0x83,
 +      LINUX_LVM_PARTITION = 0x8e,
        LINUX_RAID_PARTITION = 0xfd,    /* autodetect RAID partition */
  
        SOLARIS_X86_PARTITION = LINUX_SWAP_PARTITION,
@@@ -402,10 -402,14 +404,14 @@@ struct unixware_disklabel 
  
  #ifdef __KERNEL__
  
+ #define ADDPART_FLAG_NONE     0
+ #define ADDPART_FLAG_RAID     1
+ #define ADDPART_FLAG_WHOLEDISK        2
  char *disk_name (struct gendisk *hd, int part, char *buf);
  
  extern int rescan_partitions(struct gendisk *disk, struct block_device *bdev);
- extern void add_partition(struct gendisk *, int, sector_t, sector_t);
+ extern void add_partition(struct gendisk *, int, sector_t, sector_t, int);
  extern void delete_partition(struct gendisk *, int);
  
  extern struct gendisk *alloc_disk_node(int minors, int node_id);