lpfc_init.c (ffcde188a82497385139c62c6b6362aa4f29406f) | lpfc_init.c (bbfbbbc1182f8b44c8cc4c99f4a3f3a512149022) |
---|---|
1/******************************************************************* 2 * This file is part of the Emulex Linux Device Driver for * 3 * Fibre Channel Host Bus Adapters. * 4 * Copyright (C) 2004-2007 Emulex. All rights reserved. * 5 * EMULEX and SLI are trademarks of Emulex. * 6 * www.emulex.com * 7 * Portions Copyright (C) 2004-2005 Christoph Hellwig * 8 * * --- 1251 unchanged lines hidden (view full) --- 1260/************************************************************************/ 1261void 1262lpfc_hba_init(struct lpfc_hba *phba, uint32_t *hbainit) 1263{ 1264 int t; 1265 uint32_t *HashWorking; 1266 uint32_t *pwwnn = (uint32_t *) phba->wwnn; 1267 | 1/******************************************************************* 2 * This file is part of the Emulex Linux Device Driver for * 3 * Fibre Channel Host Bus Adapters. * 4 * Copyright (C) 2004-2007 Emulex. All rights reserved. * 5 * EMULEX and SLI are trademarks of Emulex. * 6 * www.emulex.com * 7 * Portions Copyright (C) 2004-2005 Christoph Hellwig * 8 * * --- 1251 unchanged lines hidden (view full) --- 1260/************************************************************************/ 1261void 1262lpfc_hba_init(struct lpfc_hba *phba, uint32_t *hbainit) 1263{ 1264 int t; 1265 uint32_t *HashWorking; 1266 uint32_t *pwwnn = (uint32_t *) phba->wwnn; 1267 |
1268 HashWorking = kmalloc(80 * sizeof(uint32_t), GFP_KERNEL); | 1268 HashWorking = kcalloc(80, sizeof(uint32_t), GFP_KERNEL); |
1269 if (!HashWorking) 1270 return; 1271 | 1269 if (!HashWorking) 1270 return; 1271 |
1272 memset(HashWorking, 0, (80 * sizeof(uint32_t))); | |
1273 HashWorking[0] = HashWorking[78] = *pwwnn++; 1274 HashWorking[1] = HashWorking[79] = *pwwnn; 1275 1276 for (t = 0; t < 7; t++) 1277 lpfc_challenge_key(phba->RandomData + t, HashWorking + t); 1278 1279 lpfc_sha_init(hbainit); 1280 lpfc_sha_iterate(hbainit, HashWorking); --- 991 unchanged lines hidden --- | 1272 HashWorking[0] = HashWorking[78] = *pwwnn++; 1273 HashWorking[1] = HashWorking[79] = *pwwnn; 1274 1275 for (t = 0; t < 7; t++) 1276 lpfc_challenge_key(phba->RandomData + t, HashWorking + t); 1277 1278 lpfc_sha_init(hbainit); 1279 lpfc_sha_iterate(hbainit, HashWorking); --- 991 unchanged lines hidden --- |