Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 64061
b: refs/heads/master
c: 585eb6d
h: refs/heads/master
i:
  64059: 2522656
v: v3
  • Loading branch information
Linus Torvalds committed Aug 18, 2007
1 parent 1405283 commit 93fcb4b
Show file tree
Hide file tree
Showing 24 changed files with 137 additions and 105 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: cca67164bbdb083df9adb6480822518b0f4b358f
refs/heads/master: 585eb6daa4b6886ab92ff914f55e8e87f7c2670b
2 changes: 1 addition & 1 deletion trunk/MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -1009,7 +1009,7 @@ P: Steve French
M: sfrench@samba.org
L: linux-cifs-client@lists.samba.org
L: samba-technical@lists.samba.org
W: http://us1.samba.org/samba/Linux_CIFS_client.html
W: http://linux-cifs.samba.org/
T: git kernel.org:/pub/scm/linux/kernel/git/sfrench/cifs-2.6.git
S: Supported

Expand Down
54 changes: 12 additions & 42 deletions trunk/arch/i386/boot/edd.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,40 +19,12 @@

#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE)

struct edd_dapa {
u8 pkt_size;
u8 rsvd;
u16 sector_cnt;
u16 buf_off, buf_seg;
u64 lba;
u64 buf_lin_addr;
};

/*
* Read the MBR (first sector) from a specific device.
*/
static int read_mbr(u8 devno, void *buf)
{
struct edd_dapa dapa;
u16 ax, bx, cx, dx, si;

memset(&dapa, 0, sizeof dapa);
dapa.pkt_size = sizeof(dapa);
dapa.sector_cnt = 1;
dapa.buf_off = (size_t)buf;
dapa.buf_seg = ds();
/* dapa.lba = 0; */

ax = 0x4200; /* Extended Read */
si = (size_t)&dapa;
dx = devno;
asm("pushfl; stc; int $0x13; setc %%al; popfl"
: "+a" (ax), "+S" (si), "+d" (dx)
: "m" (dapa)
: "ebx", "ecx", "edi", "memory");

if (!(u8)ax)
return 0; /* OK */
u16 ax, bx, cx, dx;

ax = 0x0201; /* Legacy Read, one sector */
cx = 0x0001; /* Sector 0-0-1 */
Expand All @@ -65,11 +37,10 @@ static int read_mbr(u8 devno, void *buf)
return -(u8)ax; /* 0 or -1 */
}

static u32 read_mbr_sig(u8 devno, struct edd_info *ei)
static u32 read_mbr_sig(u8 devno, struct edd_info *ei, u32 *mbrsig)
{
int sector_size;
char *mbrbuf_ptr, *mbrbuf_end;
u32 mbrsig;
u32 buf_base, mbr_base;
extern char _end[];

Expand All @@ -85,15 +56,15 @@ static u32 read_mbr_sig(u8 devno, struct edd_info *ei)

/* Make sure we actually have space on the heap... */
if (!(boot_params.hdr.loadflags & CAN_USE_HEAP))
return 0;
return -1;
if (mbrbuf_end > (char *)(size_t)boot_params.hdr.heap_end_ptr)
return 0;
return -1;

if (read_mbr(devno, mbrbuf_ptr))
return 0;
return -1;

mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
return mbrsig;
*mbrsig = *(u32 *)&mbrbuf_ptr[EDD_MBR_SIG_OFFSET];
return 0;
}

static int get_edd_info(u8 devno, struct edd_info *ei)
Expand Down Expand Up @@ -160,6 +131,7 @@ void query_edd(void)
int do_edd = 1;
int devno;
struct edd_info ei, *edp;
u32 *mbrptr;

if (cmdline_find_option("edd", eddarg, sizeof eddarg) > 0) {
if (!strcmp(eddarg, "skipmbr") || !strcmp(eddarg, "skip"))
Expand All @@ -168,7 +140,8 @@ void query_edd(void)
do_edd = 0;
}

edp = (struct edd_info *)boot_params.eddbuf;
edp = boot_params.eddbuf;
mbrptr = boot_params.edd_mbr_sig_buffer;

if (!do_edd)
return;
Expand All @@ -186,11 +159,8 @@ void query_edd(void)
boot_params.eddbuf_entries++;
}

if (do_mbr) {
u32 mbr_sig;
mbr_sig = read_mbr_sig(devno, &ei);
boot_params.edd_mbr_sig_buffer[devno-0x80] = mbr_sig;
}
if (do_mbr && !read_mbr_sig(devno, &ei, mbrptr++))
boot_params.edd_mbr_sig_buf_entries = devno-0x80+1;
}
}

Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/i386/boot/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ static void store_video_mode(void)

/* Not all BIOSes are clean with respect to the top bit */
boot_params.screen_info.orig_video_mode = ax & 0x7f;
boot_params.screen_info.orig_video_page = page;
boot_params.screen_info.orig_video_page = page >> 8;
}

/*
Expand Down
18 changes: 0 additions & 18 deletions trunk/arch/powerpc/boot/flatdevtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -134,20 +134,6 @@ static char *ft_next(struct ft_cxt *cxt, char *p, struct ft_atom *ret)
#define HDR_SIZE _ALIGN(sizeof(struct boot_param_header), 8)
#define EXPAND_INCR 1024 /* alloc this much extra when expanding */

/* See if the regions are in the standard order and non-overlapping */
static int ft_ordered(struct ft_cxt *cxt)
{
char *p = (char *)cxt->bph + HDR_SIZE;
enum ft_rgn_id r;

for (r = FT_RSVMAP; r <= FT_STRINGS; ++r) {
if (p > cxt->rgn[r].start)
return 0;
p = cxt->rgn[r].start + cxt->rgn[r].size;
}
return p <= (char *)cxt->bph + cxt->max_size;
}

/* Copy the tree to a newly-allocated region and put things in order */
static int ft_reorder(struct ft_cxt *cxt, int nextra)
{
Expand Down Expand Up @@ -573,10 +559,6 @@ int ft_open(struct ft_cxt *cxt, void *blob, unsigned int max_size,
cxt->rgn[FT_STRUCT].size = struct_size(cxt);
cxt->rgn[FT_STRINGS].start = blob + be32_to_cpu(bph->off_dt_strings);
cxt->rgn[FT_STRINGS].size = be32_to_cpu(bph->dt_strings_size);
/* Leave as '0' to force first ft_make_space call to do a ft_reorder
* and move dt to an area allocated by realloc.
cxt->isordered = ft_ordered(cxt);
*/

cxt->p = cxt->rgn[FT_STRUCT].start;
cxt->str_anchor = cxt->rgn[FT_STRINGS].start;
Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ obj-y += iomap.o
endif

ifeq ($(CONFIG_PPC_ISERIES),y)
CFLAGS_lparmap.s += -g0
extra-y += lparmap.s
$(obj)/head_64.o: $(obj)/lparmap.s
AFLAGS_head_64.o += -I$(obj)
Expand Down
12 changes: 11 additions & 1 deletion trunk/arch/powerpc/kernel/misc_32.S
Original file line number Diff line number Diff line change
Expand Up @@ -301,9 +301,19 @@ _GLOBAL(_tlbie)
mfspr r4,SPRN_MMUCR
mfspr r5,SPRN_PID /* Get PID */
rlwimi r4,r5,0,24,31 /* Set TID */
mtspr SPRN_MMUCR,r4

/* We have to run the search with interrupts disabled, even critical
* and debug interrupts (in fact the only critical exceptions we have
* are debug and machine check). Otherwise an interrupt which causes
* a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
mfmsr r5
lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
andc r6,r5,r6
mtmsr r6
mtspr SPRN_MMUCR,r4
tlbsx. r3, 0, r3
mtmsr r5
bne 10f
sync
/* There are only 64 TLB entries, so r3 < 64,
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/mm/hash_utils_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ void hash_preload(struct mm_struct *mm, unsigned long ea,

#ifdef CONFIG_PPC_MM_SLICES
/* We only prefault standard pages for now */
if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize));
if (unlikely(get_slice_psize(mm, ea) != mm->context.user_psize))
return;
#endif

Expand Down
1 change: 1 addition & 0 deletions trunk/arch/powerpc/platforms/cell/spu_syscalls.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ asmlinkage long sys_spu_create(const char __user *name,
if (owner && try_module_get(owner)) {
if (flags & SPU_CREATE_AFFINITY_SPU) {
neighbor = fget_light(neighbor_fd, &fput_needed);
ret = -EBADF;
if (neighbor) {
ret = spufs_calls.create_thread(name, flags,
mode, neighbor);
Expand Down
2 changes: 1 addition & 1 deletion trunk/arch/powerpc/platforms/ps3/device-init.c
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ static int ps3_storage_wait_for_device(const struct ps3_repository_device *repo)
notify_event->dev_type == repo->dev_type) {
pr_debug("%s:%u: device ready: dev_id %u\n", __func__,
__LINE__, repo->dev_id);
result = 0;
error = 0;
break;
}

Expand Down
12 changes: 11 additions & 1 deletion trunk/arch/ppc/kernel/misc.S
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,19 @@ _GLOBAL(_tlbie)
mfspr r4,SPRN_MMUCR
mfspr r5,SPRN_PID /* Get PID */
rlwimi r4,r5,0,24,31 /* Set TID */
mtspr SPRN_MMUCR,r4

/* We have to run the search with interrupts disabled, even critical
* and debug interrupts (in fact the only critical exceptions we have
* are debug and machine check). Otherwise an interrupt which causes
* a TLB miss can clobber the MMUCR between the mtspr and the tlbsx. */
mfmsr r5
lis r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@ha
addi r6,r6,(MSR_EE|MSR_CE|MSR_ME|MSR_DE)@l
andc r6,r5,r6
mtmsr r6
mtspr SPRN_MMUCR,r4
tlbsx. r3, 0, r3
mtmsr r5
bne 10f
sync
/* There are only 64 TLB entries, so r3 < 64,
Expand Down
9 changes: 8 additions & 1 deletion trunk/drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -436,7 +436,7 @@ static const struct piix_map_db ich8_map_db = {
/* PM PS SM SS MAP */
{ P0, P2, P1, P3 }, /* 00b (hardwired when in AHCI) */
{ RV, RV, RV, RV },
{ IDE, IDE, NA, NA }, /* 10b (IDE mode) */
{ P0, P2, IDE, IDE }, /* 10b (IDE mode) */
{ RV, RV, RV, RV },
},
};
Expand Down Expand Up @@ -900,6 +900,13 @@ static int piix_broken_suspend(void)
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M5"),
},
},
{
.ident = "TECRA M7",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "TOSHIBA"),
DMI_MATCH(DMI_PRODUCT_NAME, "TECRA M7"),
},
},
{
.ident = "Satellite U205",
.matches = {
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1723,7 +1723,7 @@ int ata_dev_read_id(struct ata_device *dev, unsigned int *p_class,
tf.protocol = ATA_PROT_NODATA;
tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
err_mask = ata_exec_internal(dev, &tf, NULL, DMA_NONE, NULL, 0);
if (err_mask) {
if (err_mask && id[2] != 0x738c) {
rc = -EIO;
reason = "SPINUP failed";
goto err_out;
Expand Down
19 changes: 14 additions & 5 deletions trunk/drivers/ata/pata_artop.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* pata_artop.c - ARTOP ATA controller driver
*
* (C) 2006 Red Hat <alan@redhat.com>
* (C) 2007 Bartlomiej Zolnierkiewicz
*
* Based in part on drivers/ide/pci/aec62xx.c
* Copyright (C) 1999-2002 Andre Hedrick <andre@linux-ide.org>
Expand All @@ -28,7 +29,7 @@
#include <linux/ata.h>

#define DRV_NAME "pata_artop"
#define DRV_VERSION "0.4.3"
#define DRV_VERSION "0.4.4"

/*
* The ARTOP has 33 Mhz and "over clocked" timing tables. Until we
Expand Down Expand Up @@ -430,14 +431,22 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
.udma_mask = ATA_UDMA4,
.port_ops = &artop6260_ops,
};
static const struct ata_port_info info_626x_fast = {
static const struct ata_port_info info_628x = {
.sht = &artop_sht,
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA5,
.port_ops = &artop6260_ops,
};
static const struct ata_port_info info_628x_fast = {
.sht = &artop_sht,
.flags = ATA_FLAG_SLAVE_POSS,
.pio_mask = 0x1f, /* pio0-4 */
.mwdma_mask = 0x07, /* mwdma0-2 */
.udma_mask = ATA_UDMA6,
.port_ops = &artop6260_ops,
};
const struct ata_port_info *ppi[] = { NULL, NULL };

if (!printed_version++)
Expand All @@ -455,13 +464,13 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id)
}
else if (id->driver_data == 1) /* 6260 */
ppi[0] = &info_626x;
else if (id->driver_data == 2) { /* 6260 or 6260 + fast */
else if (id->driver_data == 2) { /* 6280 or 6280 + fast */
unsigned long io = pci_resource_start(pdev, 4);
u8 reg;

ppi[0] = &info_626x;
ppi[0] = &info_628x;
if (inb(io) & 0x10)
ppi[0] = &info_626x_fast;
ppi[0] = &info_628x_fast;
/* Mac systems come up with some registers not set as we
will need them */

Expand Down
20 changes: 9 additions & 11 deletions trunk/drivers/ata/pata_hpt37x.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,10 @@
* Copyright (C) 1999-2003 Andre Hedrick <andre@linux-ide.org>
* Portions Copyright (C) 2001 Sun Microsystems, Inc.
* Portions Copyright (C) 2003 Red Hat Inc
* Portions Copyright (C) 2005-2006 MontaVista Software, Inc.
* Portions Copyright (C) 2005-2007 MontaVista Software, Inc.
*
* TODO
* PLL mode
* Look into engine reset on timeout errors. Should not be
* required.
* Look into engine reset on timeout errors. Should not be required.
*/

#include <linux/kernel.h>
Expand All @@ -26,7 +24,7 @@
#include <linux/libata.h>

#define DRV_NAME "pata_hpt37x"
#define DRV_VERSION "0.6.7"
#define DRV_VERSION "0.6.9"

struct hpt_clock {
u8 xfer_speed;
Expand Down Expand Up @@ -1092,9 +1090,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
int dpll, adjust;

/* Compute DPLL */
dpll = 2;
if (port->udma_mask & 0xE0)
dpll = 3;
dpll = (port->udma_mask & 0xC0) ? 3 : 2;

f_low = (MHz[clock_slot] * 48) / MHz[dpll];
f_high = f_low + 2;
Expand All @@ -1116,15 +1112,16 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
pci_write_config_dword(dev, 0x5C, (f_high << 16) | f_low | 0x100);
}
if (adjust == 8) {
printk(KERN_WARNING "hpt37x: DPLL did not stabilize.\n");
printk(KERN_ERR "pata_hpt37x: DPLL did not stabilize!\n");
return -ENODEV;
}
if (dpll == 3)
private_data = (void *)hpt37x_timings_66;
else
private_data = (void *)hpt37x_timings_50;

printk(KERN_INFO "hpt37x: Bus clock %dMHz, using DPLL.\n", MHz[dpll]);
printk(KERN_INFO "pata_hpt37x: bus clock %dMHz, using %dMHz DPLL.\n",
MHz[clock_slot], MHz[dpll]);
} else {
private_data = (void *)chip_table->clocks[clock_slot];
/*
Expand All @@ -1137,7 +1134,8 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id)
port = &info_hpt370_33;
if (clock_slot < 2 && port == &info_hpt370a)
port = &info_hpt370a_33;
printk(KERN_INFO "hpt37x: %s: Bus clock %dMHz.\n", chip_table->name, MHz[clock_slot]);
printk(KERN_INFO "pata_hpt37x: %s using %dMHz bus clock.\n",
chip_table->name, MHz[clock_slot]);
}

/* Now kick off ATA set up */
Expand Down
Loading

0 comments on commit 93fcb4b

Please sign in to comment.