Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 88225
b: refs/heads/master
c: 6211870
h: refs/heads/master
i:
  88223: 4e3fc94
v: v3
  • Loading branch information
Eric Sandeen authored and Lachlan McIlroy committed Apr 10, 2008
1 parent dc3eab3 commit e0dddeb
Show file tree
Hide file tree
Showing 42 changed files with 159 additions and 262 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: 999646e3f953c734f8eced551fc1ea28719ba7a7
refs/heads/master: 6211870992502efdccf9cd6bae155c83277835fa
15 changes: 1 addition & 14 deletions trunk/Documentation/spi/spi-summary
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ low order bit. So when a chip's timing diagram shows the clock
starting low (CPOL=0) and data stabilized for sampling during the
trailing clock edge (CPHA=1), that's SPI mode 1.

Note that the clock mode is relevant as soon as the chipselect goes
active. So the master must set the clock to inactive before selecting
a slave, and the slave can tell the chosen polarity by sampling the
clock level when its select line goes active. That's why many devices
support for example both modes 0 and 3: they don't care about polarity,
and alway clock data in/out on rising clock edges.


How do these driver programming interfaces work?
------------------------------------------------
Expand Down Expand Up @@ -386,14 +379,8 @@ any more such messages.
+ when bidirectional reads and writes start ... by how its
sequence of spi_transfer requests is arranged;

+ which I/O buffers are used ... each spi_transfer wraps a
buffer for each transfer direction, supporting full duplex
(two pointers, maybe the same one in both cases) and half
duplex (one pointer is NULL) transfers;

+ optionally defining short delays after transfers ... using
the spi_transfer.delay_usecs setting (this delay can be the
only protocol effect, if the buffer length is zero);
the spi_transfer.delay_usecs setting;

+ whether the chipselect becomes inactive after a transfer and
any delay ... by using the spi_transfer.cs_change flag;
Expand Down
12 changes: 4 additions & 8 deletions trunk/arch/x86/kernel/alternative.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,8 +65,7 @@ __setup("noreplace-paravirt", setup_noreplace_paravirt);
get them easily into strings. */
asm("\t.section .rodata, \"a\"\nintelnops: "
GENERIC_NOP1 GENERIC_NOP2 GENERIC_NOP3 GENERIC_NOP4 GENERIC_NOP5 GENERIC_NOP6
GENERIC_NOP7 GENERIC_NOP8
"\t.previous");
GENERIC_NOP7 GENERIC_NOP8);
extern const unsigned char intelnops[];
static const unsigned char *const intel_nops[ASM_NOP_MAX+1] = {
NULL,
Expand All @@ -84,8 +83,7 @@ static const unsigned char *const intel_nops[ASM_NOP_MAX+1] = {
#ifdef K8_NOP1
asm("\t.section .rodata, \"a\"\nk8nops: "
K8_NOP1 K8_NOP2 K8_NOP3 K8_NOP4 K8_NOP5 K8_NOP6
K8_NOP7 K8_NOP8
"\t.previous");
K8_NOP7 K8_NOP8);
extern const unsigned char k8nops[];
static const unsigned char *const k8_nops[ASM_NOP_MAX+1] = {
NULL,
Expand All @@ -103,8 +101,7 @@ static const unsigned char *const k8_nops[ASM_NOP_MAX+1] = {
#ifdef K7_NOP1
asm("\t.section .rodata, \"a\"\nk7nops: "
K7_NOP1 K7_NOP2 K7_NOP3 K7_NOP4 K7_NOP5 K7_NOP6
K7_NOP7 K7_NOP8
"\t.previous");
K7_NOP7 K7_NOP8);
extern const unsigned char k7nops[];
static const unsigned char *const k7_nops[ASM_NOP_MAX+1] = {
NULL,
Expand All @@ -122,8 +119,7 @@ static const unsigned char *const k7_nops[ASM_NOP_MAX+1] = {
#ifdef P6_NOP1
asm("\t.section .rodata, \"a\"\np6nops: "
P6_NOP1 P6_NOP2 P6_NOP3 P6_NOP4 P6_NOP5 P6_NOP6
P6_NOP7 P6_NOP8
"\t.previous");
P6_NOP7 P6_NOP8);
extern const unsigned char p6nops[];
static const unsigned char *const p6_nops[ASM_NOP_MAX+1] = {
NULL,
Expand Down
9 changes: 3 additions & 6 deletions trunk/block/cfq-iosched.c
Original file line number Diff line number Diff line change
Expand Up @@ -1214,8 +1214,6 @@ static void cfq_exit_cfqq(struct cfq_data *cfqd, struct cfq_queue *cfqq)
static void __cfq_exit_single_io_context(struct cfq_data *cfqd,
struct cfq_io_context *cic)
{
struct io_context *ioc = cic->ioc;

list_del_init(&cic->queue_list);

/*
Expand All @@ -1225,9 +1223,6 @@ static void __cfq_exit_single_io_context(struct cfq_data *cfqd,
cic->dead_key = (unsigned long) cic->key;
cic->key = NULL;

if (ioc->ioc_data == cic)
rcu_assign_pointer(ioc->ioc_data, NULL);

if (cic->cfqq[ASYNC]) {
cfq_exit_cfqq(cfqd, cic->cfqq[ASYNC]);
cic->cfqq[ASYNC] = NULL;
Expand Down Expand Up @@ -1260,6 +1255,7 @@ static void cfq_exit_single_io_context(struct io_context *ioc,
*/
static void cfq_exit_io_context(struct io_context *ioc)
{
rcu_assign_pointer(ioc->ioc_data, NULL);
call_for_each_cic(ioc, cfq_exit_single_io_context);
}

Expand Down Expand Up @@ -1482,7 +1478,8 @@ cfq_drop_dead_cic(struct cfq_data *cfqd, struct io_context *ioc,

spin_lock_irqsave(&ioc->lock, flags);

BUG_ON(ioc->ioc_data == cic);
if (ioc->ioc_data == cic)
rcu_assign_pointer(ioc->ioc_data, NULL);

radix_tree_delete(&ioc->radix_root, (unsigned long) cfqd);
hlist_del_rcu(&cic->cic_list);
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/processor_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ static int acpi_processor_remove(struct acpi_device *device, int type)
}

processors[pr->id] = NULL;
processor_device_array[pr->id] = NULL;

kfree(pr);

return 0;
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/acpi/thermal.c
Original file line number Diff line number Diff line change
Expand Up @@ -1125,7 +1125,7 @@ static int acpi_thermal_register_thermal_zone(struct acpi_thermal *tz)
tz->trips.active[i].flags.valid; i++, trips++);
tz->thermal_zone = thermal_zone_device_register("ACPI thermal zone",
trips, tz, &acpi_thermal_zone_ops);
if (IS_ERR(tz->thermal_zone))
if (!tz->thermal_zone)
return -ENODEV;

result = sysfs_create_link(&tz->device->dev.kobj,
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/ata/pata_sil680.c
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ static u8 sil680_init_chip(struct pci_dev *pdev, int *try_mmio)
tmpbyte & 1, tmpbyte & 0x30);

*try_mmio = 0;
#ifdef CONFIG_PPC_MERGE
#ifdef CONFIG_PPC
if (machine_is(cell))
*try_mmio = (tmpbyte & 1) || pci_resource_start(pdev, 5);
#endif
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/ata/sata_fsl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1256,6 +1256,7 @@ static int sata_fsl_probe(struct of_device *ofdev,
void __iomem *ssr_base = NULL;
void __iomem *csr_base = NULL;
struct sata_fsl_host_priv *host_priv = NULL;
struct resource *r;
int irq;
struct ata_host *host;

Expand All @@ -1265,6 +1266,8 @@ static int sata_fsl_probe(struct of_device *ofdev,
dev_printk(KERN_INFO, &ofdev->dev,
"Sata FSL Platform/CSB Driver init\n");

r = kmalloc(sizeof(struct resource), GFP_KERNEL);

hcr_base = of_iomap(ofdev->node, 0);
if (!hcr_base)
goto error_exit_with_cleanup;
Expand Down
38 changes: 9 additions & 29 deletions trunk/drivers/block/ub.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
* and is not licensed separately. See file COPYING for details.
*
* TODO (sorted by decreasing priority)
* -- Return sense now that rq allows it (we always auto-sense anyway).
* -- set readonly flag for CDs, set removable flag for CF readers
* -- do inquiry and verify we got a disk and not a tape (for LUN mismatch)
* -- verify the 13 conditions and do bulk resets
Expand Down Expand Up @@ -360,8 +359,7 @@ static void ub_cmd_build_block(struct ub_dev *sc, struct ub_lun *lun,
static void ub_cmd_build_packet(struct ub_dev *sc, struct ub_lun *lun,
struct ub_scsi_cmd *cmd, struct ub_request *urq);
static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
static void ub_end_rq(struct request *rq, unsigned int status,
unsigned int cmd_len);
static void ub_end_rq(struct request *rq, unsigned int status);
static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
struct ub_request *urq, struct ub_scsi_cmd *cmd);
static int ub_submit_scsi(struct ub_dev *sc, struct ub_scsi_cmd *cmd);
Expand Down Expand Up @@ -644,13 +642,13 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq)

if (atomic_read(&sc->poison)) {
blkdev_dequeue_request(rq);
ub_end_rq(rq, DID_NO_CONNECT << 16, blk_rq_bytes(rq));
ub_end_rq(rq, DID_NO_CONNECT << 16);
return 0;
}

if (lun->changed && !blk_pc_request(rq)) {
blkdev_dequeue_request(rq);
ub_end_rq(rq, SAM_STAT_CHECK_CONDITION, blk_rq_bytes(rq));
ub_end_rq(rq, SAM_STAT_CHECK_CONDITION);
return 0;
}

Expand Down Expand Up @@ -703,7 +701,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq)

drop:
ub_put_cmd(lun, cmd);
ub_end_rq(rq, DID_ERROR << 16, blk_rq_bytes(rq));
ub_end_rq(rq, DID_ERROR << 16);
return 0;
}

Expand Down Expand Up @@ -772,7 +770,6 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
struct ub_request *urq = cmd->back;
struct request *rq;
unsigned int scsi_status;
unsigned int cmd_len;

rq = urq->rq;

Expand All @@ -782,18 +779,8 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)
rq->data_len = 0;
else
rq->data_len -= cmd->act_len;
scsi_status = 0;
} else {
if (cmd->act_len != cmd->len) {
if ((cmd->key == MEDIUM_ERROR ||
cmd->key == UNIT_ATTENTION) &&
ub_rw_cmd_retry(sc, lun, urq, cmd) == 0)
return;
scsi_status = SAM_STAT_CHECK_CONDITION;
} else {
scsi_status = 0;
}
}
scsi_status = 0;
} else {
if (blk_pc_request(rq)) {
/* UB_SENSE_SIZE is smaller than SCSI_SENSE_BUFFERSIZE */
Expand All @@ -814,30 +801,23 @@ static void ub_rw_cmd_done(struct ub_dev *sc, struct ub_scsi_cmd *cmd)

urq->rq = NULL;

cmd_len = cmd->len;
ub_put_cmd(lun, cmd);
ub_end_rq(rq, scsi_status, cmd_len);
ub_end_rq(rq, scsi_status);
blk_start_queue(lun->disk->queue);
}

static void ub_end_rq(struct request *rq, unsigned int scsi_status,
unsigned int cmd_len)
static void ub_end_rq(struct request *rq, unsigned int scsi_status)
{
int error;
long rqlen;

if (scsi_status == 0) {
error = 0;
} else {
error = -EIO;
rq->errors = scsi_status;
}
rqlen = blk_rq_bytes(rq); /* Oddly enough, this is the residue. */
if (__blk_end_request(rq, error, cmd_len)) {
printk(KERN_WARNING DRV_NAME
": __blk_end_request blew, %s-cmd total %u rqlen %ld\n",
blk_pc_request(rq)? "pc": "fs", cmd_len, rqlen);
}
if (__blk_end_request(rq, error, blk_rq_bytes(rq)))
BUG();
}

static int ub_rw_cmd_retry(struct ub_dev *sc, struct ub_lun *lun,
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/mtd/chips/cfi_cmdset_0002.c
Original file line number Diff line number Diff line change
Expand Up @@ -1763,7 +1763,6 @@ static void cfi_amdstd_sync (struct mtd_info *mtd)

default:
/* Not an idle state */
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&chip->wq, &wait);

spin_unlock(chip->mutex);
Expand Down
1 change: 0 additions & 1 deletion trunk/drivers/mtd/chips/cfi_cmdset_0020.c
Original file line number Diff line number Diff line change
Expand Up @@ -1015,7 +1015,6 @@ static void cfi_staa_sync (struct mtd_info *mtd)

default:
/* Not an idle state */
set_current_state(TASK_UNINTERRUPTIBLE);
add_wait_queue(&chip->wq, &wait);

spin_unlock_bh(chip->mutex);
Expand Down
17 changes: 9 additions & 8 deletions trunk/drivers/spi/spi_bfin5xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -713,8 +713,8 @@ static void pump_transfers(unsigned long data)
} else {
drv_data->len = transfer->len;
}
dev_dbg(&drv_data->pdev->dev,
"transfer: drv_data->write is %p, chip->write is %p, null_wr is %p\n",
dev_dbg(&drv_data->pdev->dev, "transfer: ",
"drv_data->write is %p, chip->write is %p, null_wr is %p\n",
drv_data->write, chip->write, null_writer);

/* speed and width has been set on per message */
Expand Down Expand Up @@ -1294,12 +1294,6 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
goto out_error_queue_alloc;
}

status = peripheral_request_list(drv_data->pin_req, DRV_NAME);
if (status != 0) {
dev_err(&pdev->dev, ": Requesting Peripherals failed\n");
goto out_error_queue_alloc;
}

/* Register with the SPI framework */
platform_set_drvdata(pdev, drv_data);
status = spi_register_master(master);
Expand All @@ -1308,6 +1302,12 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
goto out_error_queue_alloc;
}

status = peripheral_request_list(drv_data->pin_req, DRV_NAME);
if (status != 0) {
dev_err(&pdev->dev, ": Requesting Peripherals failed\n");
goto out_error;
}

dev_info(dev, "%s, Version %s, regs_base@%p, dma channel@%d\n",
DRV_DESC, DRV_VERSION, drv_data->regs_base,
drv_data->dma_channel);
Expand All @@ -1319,6 +1319,7 @@ static int __init bfin5xx_spi_probe(struct platform_device *pdev)
iounmap((void *) drv_data->regs_base);
out_error_ioremap:
out_error_get_res:
out_error:
spi_master_put(master);

return status;
Expand Down
23 changes: 8 additions & 15 deletions trunk/fs/hfsplus/dir.c
Original file line number Diff line number Diff line change
Expand Up @@ -340,23 +340,16 @@ static int hfsplus_unlink(struct inode *dir, struct dentry *dentry)

if (inode->i_nlink > 0)
drop_nlink(inode);
if (inode->i_ino == cnid)
clear_nlink(inode);
if (!inode->i_nlink) {
if (inode->i_ino != cnid) {
HFSPLUS_SB(sb).file_count--;
if (!atomic_read(&HFSPLUS_I(inode).opencnt)) {
res = hfsplus_delete_cat(inode->i_ino,
HFSPLUS_SB(sb).hidden_dir,
NULL);
if (!res)
hfsplus_delete_inode(inode);
} else
inode->i_flags |= S_DEAD;
hfsplus_delete_inode(inode);
if (inode->i_ino != cnid && !inode->i_nlink) {
if (!atomic_read(&HFSPLUS_I(inode).opencnt)) {
res = hfsplus_delete_cat(inode->i_ino, HFSPLUS_SB(sb).hidden_dir, NULL);
if (!res)
hfsplus_delete_inode(inode);
} else
hfsplus_delete_inode(inode);
inode->i_flags |= S_DEAD;
} else
HFSPLUS_SB(sb).file_count--;
clear_nlink(inode);
inode->i_ctime = CURRENT_TIME_SEC;
mark_inode_dirty(inode);

Expand Down
4 changes: 0 additions & 4 deletions trunk/fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ const struct file_operations nfs_file_operations = {
.write = do_sync_write,
.aio_read = nfs_file_read,
.aio_write = nfs_file_write,
#ifdef CONFIG_MMU
.mmap = nfs_file_mmap,
#else
.mmap = generic_file_mmap,
#endif
.open = nfs_file_open,
.flush = nfs_file_flush,
.release = nfs_file_release,
Expand Down
1 change: 0 additions & 1 deletion trunk/fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -506,7 +506,6 @@ static struct nfs_open_context *alloc_nfs_open_context(struct vfsmount *mnt, str
ctx->cred = get_rpccred(cred);
ctx->state = NULL;
ctx->lockowner = current->files;
ctx->flags = 0;
ctx->error = 0;
ctx->dir_cookie = 0;
atomic_set(&ctx->count, 1);
Expand Down
Loading

0 comments on commit e0dddeb

Please sign in to comment.