Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 5364
b: refs/heads/master
c: 7b70888
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Jul 28, 2005
1 parent 0144710 commit 009949e
Show file tree
Hide file tree
Showing 38 changed files with 369 additions and 236 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: 0a97af41b0e77f834acc0870155de616a373e899
refs/heads/master: 7b70888a192eff457c2ca0a4ffa04815f5e19734
9 changes: 9 additions & 0 deletions trunk/Documentation/pcmcia/driver-changes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,12 @@ This file details changes in 2.6 which affect PCMCIA card driver authors:
memory regions in-use. The name argument should be a pointer to
your driver name. Eg, for pcnet_cs, name should point to the
string "pcnet_cs".

* CardServices is gone
CardServices() in 2.4 is just a big switch statement to call various
services. In 2.6, all of those entry points are exported and called
directly (except for pcmcia_report_error(), just use cs_error() instead).

* struct pcmcia_driver
You need to use struct pcmcia_driver and pcmcia_{un,}register_driver
instead of {un,}register_pccard_driver
7 changes: 7 additions & 0 deletions trunk/arch/i386/pci/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,13 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route
static __init int via_router_probe(struct irq_router *r, struct pci_dev *router, u16 device)
{
/* FIXME: We should move some of the quirk fixup stuff here */

if (router->device == PCI_DEVICE_ID_VIA_82C686 &&
device == PCI_DEVICE_ID_VIA_82C586_0) {
/* Asus k7m bios wrongly reports 82C686A as 586-compatible */
device = PCI_DEVICE_ID_VIA_82C686;
}

switch(device)
{
case PCI_DEVICE_ID_VIA_82C586_0:
Expand Down
49 changes: 26 additions & 23 deletions trunk/drivers/block/cciss.c
Original file line number Diff line number Diff line change
Expand Up @@ -1135,7 +1135,7 @@ static int revalidate_allvol(ctlr_info_t *host)
/* this is for the online array utilities */
if (!drv->heads && i)
continue;
blk_queue_hardsect_size(host->queue, drv->block_size);
blk_queue_hardsect_size(drv->queue, drv->block_size);
set_capacity(disk, drv->nr_blocks);
add_disk(disk);
}
Expand Down Expand Up @@ -1691,7 +1691,7 @@ static int cciss_revalidate(struct gendisk *disk)
cciss_read_capacity(h->ctlr, logvol, size_buff, 1, &total_size, &block_size);
cciss_geometry_inquiry(h->ctlr, logvol, 1, total_size, block_size, inq_buff, drv);

blk_queue_hardsect_size(h->queue, drv->block_size);
blk_queue_hardsect_size(drv->queue, drv->block_size);
set_capacity(disk, drv->nr_blocks);

kfree(size_buff);
Expand Down Expand Up @@ -2248,12 +2248,12 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs)
* them up. We will also keep track of the next queue to run so
* that every queue gets a chance to be started first.
*/
for (j=0; j < NWD; j++){
int curr_queue = (start_queue + j) % NWD;
for (j=0; j < h->highest_lun + 1; j++){
int curr_queue = (start_queue + j) % (h->highest_lun + 1);
/* make sure the disk has been added and the drive is real
* because this can be called from the middle of init_one.
*/
if(!(h->gendisk[curr_queue]->queue) ||
if(!(h->drv[curr_queue].queue) ||
!(h->drv[curr_queue].heads))
continue;
blk_start_queue(h->gendisk[curr_queue]->queue);
Expand All @@ -2264,22 +2264,21 @@ static irqreturn_t do_cciss_intr(int irq, void *dev_id, struct pt_regs *regs)
if ((find_first_zero_bit(h->cmd_pool_bits, NR_CMDS)) == NR_CMDS)
{
if (curr_queue == start_queue){
h->next_to_run = (start_queue + 1) % NWD;
h->next_to_run = (start_queue + 1) % (h->highest_lun + 1);
goto cleanup;
} else {
h->next_to_run = curr_queue;
goto cleanup;
}
} else {
curr_queue = (curr_queue + 1) % NWD;
curr_queue = (curr_queue + 1) % (h->highest_lun + 1);
}
}

cleanup:
spin_unlock_irqrestore(CCISS_LOCK(h->ctlr), flags);
return IRQ_HANDLED;
}

/*
* We cannot read the structure directly, for portablity we must use
* the io functions.
Expand Down Expand Up @@ -2789,13 +2788,6 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,
}

spin_lock_init(&hba[i]->lock);
q = blk_init_queue(do_cciss_request, &hba[i]->lock);
if (!q)
goto clean4;

q->backing_dev_info.ra_pages = READ_AHEAD;
hba[i]->queue = q;
q->queuedata = hba[i];

/* Initialize the pdev driver private data.
have it point to hba[i]. */
Expand All @@ -2817,6 +2809,20 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,

cciss_procinit(i);

for(j=0; j < NWD; j++) { /* mfm */
drive_info_struct *drv = &(hba[i]->drv[j]);
struct gendisk *disk = hba[i]->gendisk[j];

q = blk_init_queue(do_cciss_request, &hba[i]->lock);
if (!q) {
printk(KERN_ERR
"cciss: unable to allocate queue for disk %d\n",
j);
break;
}
drv->queue = q;

q->backing_dev_info.ra_pages = READ_AHEAD;
blk_queue_bounce_limit(q, hba[i]->pdev->dma_mask);

/* This is a hardware imposed limit. */
Expand All @@ -2827,26 +2833,23 @@ static int __devinit cciss_init_one(struct pci_dev *pdev,

blk_queue_max_sectors(q, 512);


for(j=0; j<NWD; j++) {
drive_info_struct *drv = &(hba[i]->drv[j]);
struct gendisk *disk = hba[i]->gendisk[j];

q->queuedata = hba[i];
sprintf(disk->disk_name, "cciss/c%dd%d", i, j);
sprintf(disk->devfs_name, "cciss/host%d/target%d", i, j);
disk->major = hba[i]->major;
disk->first_minor = j << NWD_SHIFT;
disk->fops = &cciss_fops;
disk->queue = hba[i]->queue;
disk->queue = q;
disk->private_data = drv;
/* we must register the controller even if no disks exist */
/* this is for the online array utilities */
if(!drv->heads && j)
continue;
blk_queue_hardsect_size(hba[i]->queue, drv->block_size);
blk_queue_hardsect_size(q, drv->block_size);
set_capacity(disk, drv->nr_blocks);
add_disk(disk);
}

return(1);

clean4:
Expand Down Expand Up @@ -2912,10 +2915,10 @@ static void __devexit cciss_remove_one (struct pci_dev *pdev)
for (j = 0; j < NWD; j++) {
struct gendisk *disk = hba[i]->gendisk[j];
if (disk->flags & GENHD_FL_UP)
blk_cleanup_queue(disk->queue);
del_gendisk(disk);
}

blk_cleanup_queue(hba[i]->queue);
pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof(CommandList_struct),
hba[i]->cmd_pool, hba[i]->cmd_pool_dhandle);
pci_free_consistent(hba[i]->pdev, NR_CMDS * sizeof( ErrorInfo_struct),
Expand Down
4 changes: 2 additions & 2 deletions trunk/drivers/block/cciss.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ typedef struct _drive_info_struct
{
__u32 LunID;
int usage_count;
struct request_queue *queue;
sector_t nr_blocks;
int block_size;
int heads;
Expand Down Expand Up @@ -72,7 +73,6 @@ struct ctlr_info
unsigned int maxQsinceinit;
unsigned int maxSG;
spinlock_t lock;
struct request_queue *queue;

//* pointers to command and error info pool */
CommandList_struct *cmd_pool;
Expand Down Expand Up @@ -260,7 +260,7 @@ struct board_type {
struct access_method *access;
};

#define CCISS_LOCK(i) (hba[i]->queue->queue_lock)
#define CCISS_LOCK(i) (&hba[i]->lock)

#endif /* CCISS_H */

14 changes: 11 additions & 3 deletions trunk/drivers/firmware/pcdp.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,22 @@ setup_serial_console(struct pcdp_uart *uart)
#ifdef CONFIG_SERIAL_8250_CONSOLE
int mmio;
static char options[64], *p = options;
char parity;

mmio = (uart->addr.address_space_id == ACPI_ADR_SPACE_SYSTEM_MEMORY);
p += sprintf(p, "console=uart,%s,0x%lx",
mmio ? "mmio" : "io", uart->addr.address);
if (uart->baud)
if (uart->baud) {
p += sprintf(p, ",%lu", uart->baud);
if (uart->bits)
p += sprintf(p, "n%d", uart->bits);
if (uart->bits) {
switch (uart->parity) {
case 0x2: parity = 'e'; break;
case 0x3: parity = 'o'; break;
default: parity = 'n';
}
p += sprintf(p, "%c%d", parity, uart->bits);
}
}

return early_serial_console_init(options);
#else
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/ide/legacy/ide-cs.c
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("CNF CD-M", "CD-ROM", 0x7d93b852, 0x66536591),
PCMCIA_DEVICE_PROD_ID12("Creative Technology Ltd.", "PCMCIA CD-ROM Interface Card", 0xff8c8a45, 0xfe8020c4),
PCMCIA_DEVICE_PROD_ID12("Digital Equipment Corporation.", "Digital Mobile Media CD-ROM", 0x17692a66, 0xef1dcbde),
PCMCIA_DEVICE_PROD_ID12("EXP", "CD", 0x6f58c983, 0xaae5994f),
PCMCIA_DEVICE_PROD_ID12("EXP", "CD+GAME", 0x6f58c983, 0x63c13aaf),
PCMCIA_DEVICE_PROD_ID12("EXP ", "CD-ROM", 0x0a5c52fd, 0x66536591),
PCMCIA_DEVICE_PROD_ID12("EXP ", "PnPIDE", 0x0a5c52fd, 0x0c694728),
PCMCIA_DEVICE_PROD_ID12("FREECOM", "PCCARD-IDE", 0x5714cbf7, 0x48e0ab8e),
Expand All @@ -481,6 +481,7 @@ static struct pcmcia_device_id ide_ids[] = {
PCMCIA_DEVICE_PROD_ID12("TOSHIBA", "MK2001MPL", 0xb4585a1a, 0x3489e003),
PCMCIA_DEVICE_PROD_ID12("WIT", "IDE16", 0x244e5994, 0x3e232852),
PCMCIA_DEVICE_PROD_ID1("STI Flash", 0xe4a13209),
PCMCIA_MFC_DEVICE_PROD_ID12(1, "SanDisk", "ConnectPlus", 0x7a954bd9, 0x74be00c6),
PCMCIA_DEVICE_NULL,
};
MODULE_DEVICE_TABLE(pcmcia, ide_ids);
Expand Down
Loading

0 comments on commit 009949e

Please sign in to comment.