Changeset 192565b in mainline for uspace/drv


Ignore:
Timestamp:
2013-05-27T13:18:13Z (12 years ago)
Author:
Jan Vesely <jano.vesely@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
f2c19b0
Parents:
d120133 (diff), c90aed4 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge mainline changes.

Location:
uspace/drv
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • uspace/drv/block/ahci/ahci.c

    rd120133 r192565b  
    242242        }
    243243       
    244         bzero(buf, sata->block_size);
     244        memset(buf, 0, sata->block_size);
    245245       
    246246        fibril_mutex_lock(&sata->lock);
     
    444444        }
    445445       
    446         bzero(idata, SATA_IDENTIFY_DEVICE_BUFFER_LENGTH);
     446        memset(idata, 0, SATA_IDENTIFY_DEVICE_BUFFER_LENGTH);
    447447       
    448448        fibril_mutex_lock(&sata->lock);
     
    637637        }
    638638       
    639         bzero(idata, SATA_SET_FEATURE_BUFFER_LENGTH);
     639        memset(idata, 0, SATA_SET_FEATURE_BUFFER_LENGTH);
    640640       
    641641        fibril_mutex_lock(&sata->lock);
     
    954954                goto error_retfis;
    955955       
    956         bzero(virt_fb, size);
     956        memset(virt_fb, 0, size);
    957957        sata->port->pxfbu = HI(phys);
    958958        sata->port->pxfb = LO(phys);
     
    964964                goto error_cmd;
    965965       
    966         bzero(virt_cmd, size);
     966        memset(virt_cmd, 0, size);
    967967        sata->port->pxclbu = HI(phys);
    968968        sata->port->pxclb = LO(phys);
     
    975975                goto error_table;
    976976       
    977         bzero(virt_table, size);
     977        memset(virt_table, 0, size);
    978978        sata->cmd_header->cmdtableu = HI(phys);
    979979        sata->cmd_header->cmdtable = LO(phys);
     
    12871287{
    12881288        uint8_t model[40];
    1289         bzero(model, 40);
     1289        memset(model, 0, 40);
    12901290       
    12911291        for (unsigned int i = 0; i < 20; i++) {
  • uspace/drv/bus/pci/pciintel/pci.c

    rd120133 r192565b  
    327327
    328328        /* Vendor ID & Device ID, length(incl \0) 22 */
    329         rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04x&dev=%04x",
    330             fun->vendor_id, fun->device_id);
     329        rc = snprintf(match_id_str, ID_MAX_STR_LEN, "pci/ven=%04"
     330            PRIx16 "&dev=%04" PRIx16, fun->vendor_id, fun->device_id);
    331331        if (rc < 0) {
    332332                ddf_msg(LVL_ERROR, "Failed creating match ID str: %s",
     
    758758        fun->vendor_id = pci_conf_read_16(fun, PCI_VENDOR_ID);
    759759        fun->device_id = pci_conf_read_16(fun, PCI_DEVICE_ID);
     760       
     761        /* Explicitly enable PCI bus mastering */
     762        fun->command = pci_conf_read_16(fun, PCI_COMMAND) |
     763            PCI_COMMAND_MASTER;
     764        pci_conf_write_16(fun, PCI_COMMAND, fun->command);
     765       
    760766        fun->class_code = pci_conf_read_8(fun, PCI_BASE_CLASS);
    761767        fun->subclass_code = pci_conf_read_8(fun, PCI_SUB_CLASS);
  • uspace/drv/bus/pci/pciintel/pci.h

    rd120133 r192565b  
    5959        int dev;
    6060        int fn;
    61         int vendor_id;
    62         int device_id;
     61        uint16_t vendor_id;
     62        uint16_t device_id;
     63        uint16_t command;
    6364        uint8_t class_code;
    6465        uint8_t subclass_code;
  • uspace/drv/bus/pci/pciintel/pci_regs.h

    rd120133 r192565b  
    9595#define PCI_BRIDGE_CTL                  0x3E
    9696
     97/* PCI command flags */
     98#define PCI_COMMAND_IO            0x001
     99#define PCI_COMMAND_MEMORY        0x002
     100#define PCI_COMMAND_MASTER        0x004
     101#define PCI_COMMAND_SPECIAL       0x008
     102#define PCI_COMMAND_INVALIDATE    0x010
     103#define PCI_COMMAND_VGA_PALETTE   0x020
     104#define PCI_COMMAND_PARITY        0x040
     105#define PCI_COMMAND_WAIT          0x080
     106#define PCI_COMMAND_SERR          0x100
     107#define PCI_COMMAND_FAST_BACK     0x200
     108#define PCI_COMMAND_INTX_DISABLE  0x400
     109
    97110#endif
    98111
  • uspace/drv/bus/usb/ohci/hc.c

    rd120133 r192565b  
    602602        assert(instance);
    603603
    604         bzero(&instance->rh, sizeof(instance->rh));
     604        memset(&instance->rh, 0, sizeof(instance->rh));
    605605        /* Init queues */
    606606        const int ret = hc_init_transfer_lists(instance);
  • uspace/drv/bus/usb/ohci/hw_struct/endpoint_descriptor.c

    rd120133 r192565b  
    5353{
    5454        assert(instance);
    55         bzero(instance, sizeof(ed_t));
     55        memset(instance, 0, sizeof(ed_t));
    5656
    5757        if (ep == NULL) {
  • uspace/drv/bus/usb/ohci/hw_struct/hcca.h

    rd120133 r192565b  
    6868        hcca_t *hcca = memalign(256, sizeof(hcca_t));
    6969        if (hcca)
    70                 bzero(hcca, sizeof(hcca_t));
     70                memset(hcca, 0, sizeof(hcca_t));
    7171        return hcca;
    7272}
  • uspace/drv/bus/usb/ohci/hw_struct/transfer_descriptor.c

    rd120133 r192565b  
    5858{
    5959        assert(instance);
    60         bzero(instance, sizeof(td_t));
     60        memset(instance, 0, sizeof(td_t));
    6161        /* Set PID and Error code */
    6262        OHCI_MEM32_WR(instance->status,
  • uspace/drv/bus/usb/uhci/uhci_batch.c

    rd120133 r192565b  
    112112        CHECK_NULL_DISPOSE_RETURN(uhci_batch->device_buffer,
    113113            "Failed to allocate UHCI buffer.\n");
    114         bzero(uhci_batch->device_buffer, total_size);
     114        memset(uhci_batch->device_buffer, 0, total_size);
    115115
    116116        uhci_batch->tds = uhci_batch->device_buffer;
  • uspace/drv/bus/usb/usbhub/port.c

    rd120133 r192565b  
    143143        usb_log_debug("Interrupt at port %zu\n", port->port_number);
    144144
    145         usb_port_status_t status;
     145        usb_port_status_t status = 0;
    146146        const int opResult = get_port_status(port, &status);
    147147        if (opResult != EOK) {
  • uspace/drv/bus/usb/usbmast/scsi_ms.c

    rd120133 r192565b  
    167167         */
    168168
    169         bzero(inq_res, sizeof(*inq_res));
     169        memset(inq_res, 0, sizeof(*inq_res));
    170170
    171171        inq_res->device_type = BIT_RANGE_EXTRACT(uint8_t,
  • uspace/drv/char/i8042/buffer.h

    rd120133 r192565b  
    7676        buffer->read_head = buffer->buffer;
    7777        buffer->write_head = buffer->buffer;
    78         bzero(buffer->buffer, size);
     78        memset(buffer->buffer, 0, size);
    7979}
    8080
  • uspace/drv/char/ns8250/ns8250.c

    rd120133 r192565b  
    160160        /** I/O registers **/
    161161        ns8250_regs_t *regs;
    162         /** Is there any client conntected to the device? */
     162        /** Is there any client connected to the device? */
    163163        bool client_connected;
    164164        /** The irq assigned to this device. */
     
    168168        /** The i/o port used to access the serial ports registers. */
    169169        ioport8_t *port;
    170         /** The buffer for incomming data. */
     170        /** The buffer for incoming data. */
    171171        cyclic_buffer_t input_buffer;
    172172        /** The fibril mutex for synchronizing the access to the device. */
     
    190190}
    191191
    192 /** Find out if there is some incomming data available on the serial port.
     192/** Find out if there is some incoming data available on the serial port.
    193193 *
    194194 * @param port          The base address of the serial port device's ports.
  • uspace/drv/nic/e1k/e1k.c

    rd120133 r192565b  
    293293        assert(info);
    294294       
    295         bzero(info, sizeof(nic_device_info_t));
     295        memset(info, 0, sizeof(nic_device_info_t));
    296296       
    297297        info->vendor_id = 0x8086;
     
    15811581                goto error;
    15821582       
    1583         bzero(e1000->tx_ring_virt,
     1583        memset(e1000->tx_ring_virt, 0,
    15841584            E1000_TX_FRAME_COUNT * sizeof(e1000_tx_descriptor_t));
    15851585       
     
    18721872        }
    18731873       
    1874         bzero(e1000, sizeof(e1000_t));
     1874        memset(e1000, 0, sizeof(e1000_t));
    18751875       
    18761876        nic_set_specific(nic, e1000);
  • uspace/drv/nic/ne2k/dp8390.c

    rd120133 r192565b  
    446446                return NULL;
    447447       
    448         bzero(frame->data, length);
     448        memset(frame->data, 0, length);
    449449        uint8_t last = page + length / DP_PAGE;
    450450       
  • uspace/drv/nic/rtl8139/driver.c

    rd120133 r192565b  
    10201020        }
    10211021
    1022         bzero(rtl8139, sizeof(rtl8139_t));
     1022        memset(rtl8139, 0, sizeof(rtl8139_t));
    10231023
    10241024        rtl8139->nic_data = nic_data;
Note: See TracChangeset for help on using the changeset viewer.