if (drive->removable && id != NULL) {
if (!strncmp(id->model, "KODAK ATA_FLASH", 15) /* Kodak */
|| !strncmp(id->model, "Hitachi CV", 10) /* Hitachi */
- || !strncmp(id->model, "SunDisk SDCFB", 13)) /* SunDisk */
+ || !strncmp(id->model, "SunDisk SDCFB", 13) /* SunDisk */
+ || !strncmp(id->model, "HAGIWARA HPC", 12)) /* Hagiwara */
{
return 1; /* yes, it is a flash memory card */
}
sti();
for (unit = 0; unit < MAX_DRIVES; ++unit) {
drive = &hwif->drives[unit];
+ if (!drive->present)
+ continue;
minor = drive->select.b.unit << PARTN_BITS;
for (p = 0; p < (1<<PARTN_BITS); ++p) {
if (drive->part[p].nr_sects > 0) {
/* How much shared RAM is on adapter ? */
#ifdef PCMCIA
ti->avail_shared_ram = pcmcia_reality_check(get_sram_size(ti));
- ibmtr_mem_base = ti->sram_base ;
+ ibmtr_mem_base = ti->sram_base << 12 ;
#else
ti->avail_shared_ram = get_sram_size(ti);
#endif
(int)readb(ti->srb + offsetof(struct srb_close_adapter, ret_code)));
dev->start = 0;
+#ifdef PCMCIA
+ ti->sram = 0 ;
+#endif
DPRINTK("Adapter closed.\n");
MOD_DEC_USE_COUNT;
/* Turn on interrups */
outb(UART_IER_RLSI|UART_IER_RDI|UART_IER_THRI, iobase+UART_IER);
- spin_unlock_irqrestore(&self->lock, flags);
+ spin_unlock_irqrestore(&idev->lock, flags);
}
/*
retval = -ENOMEM;
size = elf_ex.e_phentsize * elf_ex.e_phnum;
+ if (size > 65536)
+ goto out;
elf_phdata = (struct elf_phdr *) kmalloc(size, GFP_KERNEL);
if (!elf_phdata)
goto out;
set_fs(KERNEL_DS);
get_user(str, argv+argc);
if (!str)
- panic("VFS: argc is wrong");
+ {
+ set_fs(old_fs);
+ return 0;
+// panic("VFS: argc is wrong");
+ }
if (from_kmem == 1)
set_fs(old_fs);
len = strlen_user(str); /* includes the '\0' */